Vinay Sajip <vinay_sajip <at> yahoo.co.uk> writes:
>
> In the py3k branch, logging has the line
>
> _unicode = 'unicode' in dir(__builtins__)
Why do you do this?
In py3k, unicode is always enabled but it's called "str" and the name "unicode"
doesn't exist.
> to determine the existence of Unicode support. The code in trunk, being 1.5.2
> compatible, used
>
> hasattr(types, 'UnicodeType')
Why don't you simply write:
unicode_support = True
try:
unicode
except NameError:
unicode_support = False
?
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com