[issue8562] hasattr(open, 'newlines') example gives incorrect results from PEP0278
AdamN
report at bugs.python.org
Wed Apr 28 21:45:41 CEST 2010
New submission from AdamN <adam at varud.com>:
This bug from the Ubuntu list is being moved here:
https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/570737
Newlines support is enabled on Ubuntu but the example from:
http://www.python.org/dev/peps/pep-0278/
Does not give the correct results (of True):
if hasattr(open, 'newlines'):
print 'We have universal newline support'
I don't know if this is a documentation problem or whether there is another attr that matters here.
----------
assignee: docs at python
components: Documentation, Windows
messages: 104454
nosy: adamnelson, docs at python
priority: normal
severity: normal
status: open
title: hasattr(open,'newlines') example gives incorrect results from PEP0278
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8562>
_______________________________________
More information about the Python-bugs-list
mailing list