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.

Author lars.gustaebel
Recipients lars.gustaebel
Date 2012-09-16.10:15:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Today I accidentally did this:


Passing True as a file argument to open() does not fail, because a bool value is treated like an integer file descriptor (stdout in this case). Even worse is that the read() call hangs in an endless loop on my linux box. On windows I get an EBADF at least.

Wouldn't it be better if open() checked explicitly for a bool argument and raises a TypeError?
Date User Action Args
2012-09-16 10:15:16lars.gustaebelsetrecipients: + lars.gustaebel
2012-09-16 10:15:16lars.gustaebelsetmessageid: <>
2012-09-16 10:15:15lars.gustaebellinkissue15950 messages
2012-09-16 10:15:15lars.gustaebelcreate