[issue8562] hasattr(open, 'newlines') example gives incorrect results from PEP0278
New submission from AdamN <adam@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@python components: Documentation, Windows messages: 104454 nosy: adamnelson, docs@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@bugs.python.org> <http://bugs.python.org/issue8562> _______________________________________
Changes by Matt Wartell <matt.wartell+pt@gmail.com>: ---------- nosy: +Matt.Wartell _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8562> _______________________________________
Changes by David Antliff <david.antliff@gmail.com>: ---------- nosy: +David.Antliff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8562> _______________________________________
Georg Brandl <georg@python.org> added the comment: Fixed in r83556. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8562> _______________________________________
participants (4)
-
AdamN
-
David Antliff
-
Georg Brandl
-
Matt Wartell