For questions about Python programming that are specific to version 2.x of the language.
In Python 2.5, the following code raises a TypeError: >>> class X: def a(self): print "a" >>&…
python inheritance python-2.x superIs there a standard way of using exception chains in Python? Like the Java exception 'caused by'? Here is some …
python exception coding-style python-2.xI try to copy a file with pathlib import pathlib import shutil my_file=pathlib.Path('/etc/hosts') to_…
python file copy python-2.x pathlibWhen "deconstructing" a tuple, I can use _ to denote tuple elements I'm not interested in, e.g. >>> …
python python-2.xIn console when I'm trying output Russian characters It gives me ??????????????? Who know why? I tried write to file - …
python windows unicode python-2.x python-unicodeI want to print some floating point numbers so that they're always written in decimal form (e.g. 12345000000000000000000.0 or 0.000000000000012345, not …
python python-3.x floating-point number-formatting python-2.xI'm trying to implement a closure in Python 2.6 and I need to access a nonlocal variable but it seems like …
python closures python-2.x python-nonlocalstuff/ __init__.py mylib.py Foo/ __init__.py main.py foo/ __init__.py script.py script.py wants to import …
python python-2.x relative-path python-packagingThe following piece of code class point: def __init__(self, x, y): self.x = x self.y = y def dispc(…
python python-3.x python-2.x partial-orderingThis seems like a simple task and I'm not sure if I've accomplished it already, or if I'm chasing my …
python string python-2.x httplib2