This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: hasattr(open,'newlines') example gives incorrect results from PEP0278
Type: behavior Stage:
Components: Documentation, Windows Versions: Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: David.Antliff, Matt.Wartell, adamnelson, docs@python, georg.brandl
Priority: normal Keywords:

Created on 2010-04-28 19:45 by adamnelson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg104454 - (view) Author: AdamN (adamnelson) Date: 2010-04-28 19:45
This bug from the Ubuntu list is being moved here:

Newlines support is enabled on Ubuntu but the example from:

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.
msg112530 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-02 19:50
Fixed in r83556.
Date User Action Args
2022-04-11 14:57:00adminsetgithub: 52808
2010-08-02 19:50:25georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112530

resolution: fixed
2010-05-24 23:39:14David.Antliffsetnosy: + David.Antliff
2010-04-29 01:45:12Matt.Wartellsetnosy: + Matt.Wartell
2010-04-28 19:45:38adamnelsoncreate