I worked in python when f-strings were pretty new. Didn't realise why you would use anything else. It just reads better.
comments
And here I thought f-strings were something that happen when others are forced to read my code.
Formatting strings, the running gag of the Python community.
What annoyed me moving from % to format was the loss of “formatting” floats to integers with “{:d}”, now you get a ValueError
I’m not! I’m excited to forget this exists the next time it would be convenient for me to remember it 😋
lol, don't be too hard on yourself!
Didn’t think I’d learn anything new in this article, but I never knew about f-string’s self-documenting expression syntax. I’ve been doing it myself like a chump!
Like where you were going with ordering tea.
For seasoning recommend, nutmeg and cinnamon. And just assume it smells nice. Without the ritual rolling a $ bill and snorting it.
For variety, can also add turmeric and powder pepper. The combination is supposed to be good for health, but guaranteed to blow the mind of your neighbors. Who are not used to putting pepper in tea.
tl;dr
- cooldown
Give security researchers time to detect supply chain attacks, by delaying installing a package's latest release by n days. Where n is delay before security researchers are able to acknowledge sarcasm (aka some arbitrary number).
$> pip install --uploaded-prior-to=P3D pip --force-reinstall # exclude the recent pip release
Where 3D is delay by 3 days. From the context, guess P means prior, not pussy, pizza, nor pedocrat. Actually your guess is as good as mine. I'm confused what P is supposed to mean, especially given the state of the dating scene.
- lock file support
some foreplay and teasing
[The action] was set up in a way where text from a PR comment could be passed directly into a shell command, so whatever the comment said, the runner would execute it.
Oh, lol
Nice. For me those first steps always stretch out… I sit down “just to start” and suddenly 20 minutes are gone.
My ritual to get started is usually make a cup of tea, close the distraction apps, put on music, take a deep breath of the tea, and then get started.
I’m still experimenting with what helps me start working. If you have any small rituals or tricks, I’d love to hear them.
Thanks for the clarification. I always thought that the GPL parts are also MIT then.
yes, you're creating a derivative work that is entirely GPL. note that this doesn't stop anyone from consulting the original since FOSS licenses do not have revocation. if they use none of the GPL derivative work they can still only abide by MIT. however, your changes would only exist in the GPL work, and they must be used with GPL.
Thanks for the info.
So you can relicense MIT to GPL without the MiT parts staying MIT?
The MIT is what's called a permissive license.
Copyright
Permission is hereby granted , free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense , and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
That's the entirety of the text. You can do pretty much anything as long as you make sure the first line is still visible somewhere (and if you're not incorporating/relicensing it into GPL, you have to include the MIT license text as well; I'm less sure about how this parenthetical works but I do know an MIT project relicensed to GPL needs not include the MIT text), which in GPL it is.
Do you have more on that?
I'm not sure you can relicense the MIT code under GPL if you are not the author or it doesn't say so in the MIT license, that relicensing is permitted.
uv is under an MIT license, so every fork is free to relicense themselves as GPL and prevent openai's gobblies.
pithon
πthon
There are tools to check README files. Which would give suggestions on what needs to be fixed.
If you are using Sphinx anyway, would suggest going with a ReStructuredText rather than vanilla markdown.
In your Sphinx docs, can mix rst and md but the index file must be index.rst, not index.md
Then use this sphinx-external-toc-strict for structuring your Sphinx docs.
restview for real time editing of restructuredtext file
make links absolute links to the images on codeberg
Using id() as a key in dict() may get you into trouble.
IMO, using id() as a key would never be a good idea under any circumstance.
Two different (and even unequal) objects can have the same id():
>>> x = [1]
>>> id(x)
4527263424
>>> del x
>>> x = [2]
>>> id(x)
4527263424
>>> del x
>>> y = [3]
>>> id(y)
4527263424
Note - a dictionary lookup already looks up the key by id() first as a shortcut (under-the-hood), so there's no need to try doing this as an optimization.
Edit: in case it wasn't clear above, the object with the same id()s don't all exist at the same time; but if you store their ids as a key, you'd have to ensure the object lifetimes are identical to be sure the ids could identify the same stored value. The dictionary does this for you when you use the key object, but it's not automatic when using the id of the key.
Other Note - Since you phrased it as "all ints below a fixed limit share the same id() result", I'd suggest a better way to semantically think of it is that certain constant objects are pre-allocated, and thus are kinda like singletons. There is usually only one int(1) object, and the language keeps a pre-allocated pool of these common small ints (since they are used so often for indexing anyway).
Similarly, many short string constants are 'interned' in a similar way; they aren't pre-created at startup, but once they are created by the user declaring a string constant when the code is run, it saves memory to check and only keep one copy of those string objects, as the string constants can be checked at byte-compile time. But if you construct the string with code, it doesn't bother to check all the strings to see if there exists an identical one. So for example:
>>> x = 'ab'
>>> y = 'ab'
>>> id(x) == id(y)
True
>>> s = 'a'
>>> s = s + 'b'
>>> id(s) == id(x)
False
>>> s == x == y
True
But you can force it to make this check; it's something they made more tedious to do in Python3 since it's really an implementation detail:
>>> import sys
>>> s = sys.intern(s)
>>> id(s) == id(x)
True
Sorry for the verbose reply; hope it helped.
And we can create data structures and algorithms that fit a more functional style without relying on imperative assumptions of how data should be handled. Data structures like vlists could be applicable, for example.