FediScanner

#python

← Back

Top Four funniest things about Python (language by Guido):
4. IDLE IDE named after Eric.
3. import antigravity
2. import turtle; turtle.reset(); turtle.forward(100); whee!
1. How incredibly irate whitespace indenting makes faux-traditional programmers (knows of Algol but is unaware of/disrespects FORTRAN).
#python

Show Original PostReport

PEP 841: Adding Frozen Syntax to Optimize Immutable Types

This PEP proposes frozen display syntax: f{1, 2, 3} evaluates to a frozenset, and f{'a': 1} evaluates to a frozendict. Because immutability is guaranteed by the syntax itself rather than inferred from usage, the compiler can treat frozen displays as first-class citizens of its optimization pipeline: constant displays are folded into a single LOAD_CONST with an exact result type at compile time and cached in .pyc files.

python

Show Original PostReport

So apparently pipenv doesn’t like installing from private Bitbucket (and maybe other?) repos with ‘git+https://{username}@{bitbucket.org}/{project}/{repo}.git@{branch}’ syntax.

It kept setting the git to username and ref to the rest of the url, and then failing because it tried to fetch dependencies that didn’t exist or something. I suspect it’s to do with the first ‘@‘ symbol between the username and the bitbucket domain.

Took me aaaaages to work it out, but managed to workaround it by creating the Pipfile entry manually, and then pipenv install to install from the Pipfile 🎉

It was hard, and frustrating. But I learned stuff, and got the good satisfaction feelings when I succeeded 🥰

#Python #PipEnv #git #bitbucket

Show Original PostReport

While I am still AWOL myself, I got an interesting piece of trivia from the guy who run's NZ's #python stuff.

a. Pre- #lisp, the python program was so named "because it could swallow the whole pig". (!).

b. The early versions of python (moderne) explicitly had cmucl lisp python compatibility functions, which were dropped after it became independently popular aside from its name collision at universities.

Though his source was "he googled it" so I dunno, I don't partake in that personally.

Show Original PostReport