Python version

update for python version >= 3.10: staticmethod functions can be called from within class scope just fine (for more info see: python issue tracker, or “what’s new”, or here) for python version <= 3.9 continue reading staticmethod objects apparently have a __func__ attribute storing the original raw function (makes sense that they had to). So … Read more

pip3 on python3.9 fails on ‘HTMLParser’ object has no attribute ‘unescape’ [duplicate]

After some trial and error I upgraded, pip, distlib and setuptools and it solved it. Not sure which of those is causing it. (On the last two I found issues 1 2 of other sites) It is caused by removing unescape from HTMLParser in python3.9, which seems to break setuptools. pip3 install –upgrade setuptools If … Read more

How to install python with conda?

To create python 3.11 conda environment use the following command conda create -n py311 python=3.11 py311 – environment name Update 3 To create python 3.10 conda environment use the following command conda create -n py310 python=3.10 py310 – environment name Update 2 You can now directly create python 3.9 environment using the following command conda … Read more

What are “soft keywords”?

Short: Soft keywords can still be used as variable or argument names. PEP 622 sheds some light (Emphasis mine): The difference between hard and soft keywords is that hard keywords are always reserved words, even in positions where they make no sense (e.g. x = class + 1), while soft keywords only get a special … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)