[Python-checkins] python/nondist/sandbox/path path.py, 1.1, 1.2 test_path.py, 1.1, 1.2
George Yoshida
python at dynkin.com
Sat Jul 23 14:40:51 CEST 2005
birkenfeld at users.sourceforge.net wrote:
> Update of /cvsroot/python/python/nondist/sandbox/path
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18577
>
> Modified Files:
> path.py test_path.py
> Log Message:
> Path inherits from str or unicode again.
>
> if os.path.supports_unicode_filenames:
> _base = unicode
> else:
> _base = str
str and unicode are not interchangeable.
>>> set(vars(str)) - set(vars(unicode))
set(['__ne__', '__le__', '__gt__', '__lt__', '__eq__', '__ge__'])
For example, if _base is unicode, _base.__eq__(self, other) raises
AttributeError.
--
george
More information about the Python-checkins
mailing list