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 | christian.heimes |
|---|---|
| Recipients | amaury.forgeotdarc, christian.heimes, gvanrossum |
| Date | 2007年11月13日.16:35:22 |
| SpamBayes Score | 0.051655576 |
| Marked as misclassified | No |
| Message-id | <1194971722.78.0.382878292531.issue1415@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
As far as I can see print() works if sys.stdout is either None (discard output ASAP) or a file like object. Even print(file=syst.stderr) works. sys.stdout.write() is going to fail when sys.stdout is None but that's not my concern. It's another well documented difference between Python 2.x and 3.x. If people still need a valid but no op stdout they can set up their own: class NullWriter: def write(self, data): pass if sys.stdout is None: sys.stdout = NullWriter() Done ;) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007年11月13日 16:35:23 | christian.heimes | set | spambayes_score: 0.0516556 -> 0.051655576 recipients: + christian.heimes, gvanrossum, amaury.forgeotdarc |
| 2007年11月13日 16:35:23 | christian.heimes | set | spambayes_score: 0.0516556 -> 0.0516556 messageid: <1194971722.78.0.382878292531.issue1415@psf.upfronthosting.co.za> |
| 2007年11月13日 16:35:22 | christian.heimes | link | issue1415 messages |
| 2007年11月13日 16:35:22 | christian.heimes | create | |