qwop

joined 1 year ago
[–] [email protected] 1 points 6 months ago

The full changelog for this release is here https://docs.python.org/release/3.11.7/whatsnew/changelog.html#python-3-11-7-final

Surprisingly not shown that obviously in the release announcements, but I guess that's fair since most of the changes will have no effect on 99.9999% of people.

[–] [email protected] 5 points 9 months ago

Sounds fine, they're both immutable which helps.

[–] [email protected] 3 points 9 months ago (1 children)

UTF-8 is an encoding for unicode, that means it's a way of representing a unicode string as actual bytes on a computer.

It is variable length and works by using the first bits of each byte to indicate how many bytes are are needed to represent the current character.

Python also uses an encoding, as you describe in the article, but it's different to UTF-8. Unlike unicode, all characters in Python's representation of the unicode string use the same number of bytes, which is the maximum that any individual unicode character in the string needs.

I'd probably mess up a more detailed explanation of UTF-8 or Python's representation, so I'll let you look into how they work in more detail if you're interested.

[–] [email protected] 3 points 9 months ago (3 children)

The article says that CPython represents strings as UTF-8 encoded, which is not correct. The details about how it works are correct, just that's not UTF-8.

That's just a minor point though, nice article.

[–] [email protected] 4 points 9 months ago (1 children)

At least the last season of scrubs was a different enough setting/cast, so even though it was definitely not as good, it didn't "ruin" it for me like some other series that have gone on too long.

[–] [email protected] 1 points 9 months ago

Probably no time soon.

[–] [email protected] 5 points 9 months ago

That video was the first thing I thought of :)

(https://youtu.be/YUpST_cQ1hM for anyone wondering)

[–] [email protected] 2 points 9 months ago (1 children)

Well I kept using it until Infinity died, which was only at the start of this month!

If I do decide to go back, it will be by compiling the infinity APK with my own API key, but I'm not feeling much of an urge to bother at the moment.

[–] [email protected] 2 points 9 months ago

It'd be nice to have a rule specifically for the use of f-strings and template formatting in the same call, since that can easily be a security vulnerability.

[–] [email protected] 1 points 9 months ago

I'm pretty sure most type checkers recognise both forms.

[–] [email protected] 2 points 9 months ago

It probably really depends on the project, though I'd probably try and start with the tests that are easiest/nicest to write and those which will be most useful. Look for complex logic that is also quite self-contained.

That will probably help to convince others of the value of tests if they aren't onboard already.

 

Featuring:

  • Identifying bundled libraries on Python distributions to help scanning for vulnerabilities.
  • Trusted Publisher adoption metrics.
  • GitHub push protection for PyPI API tokens.

Lots of great stuff!

 

Cross Posting from DevOps, I hope this is the correct way of doing that and it's considered acceptable.

 

Cross Posting from DevOps, I hope this is the correct way of doing that and it's considered acceptable.

7
GitLab Outage (status.gitlab.com)
 

Seems to be back up now, still waiting for information on the cause, so far have the vague reason "config change" from the GitLab issue linked

 

See Seth's earlier post Announcing that he was taking up the place: https://sethmlarson.dev/security-developer-in-residence

20
Python 2 in Python 3! (programming.dev)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

A post about how this community's banner used the python 2 print syntax - print "Hello World" - made me question, can we print a hello world message in Python 3 without using parentheses?

It turned out to be sort of a fun challenge, I've found 3 different approaches that work. I'd be interested to see what you come up with! (it seems I can't put spoilers in Lemmy, so I won't share my solutions yet in case y'all want to have a go).

Edit: Posted my solutions in the comments

view more: next ›