homepage

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 pitrou
Recipients Arfrever, amaury.forgeotdarc, belopolsky, benjamin.peterson, doko, exarkun, loewis, naufraghi, neologix, petere, pitrou, stutzbach
Date 2011年11月27日.22:14:17
SpamBayes Score 2.5167266e-05
Marked as misclassified No
Message-id <1322431756.3284.1.camel@localhost.localdomain>
In-reply-to <1322391454.34.0.832001251191.issue7111@psf.upfronthosting.co.za>
Content
> +is_valid_fd(int fd)
> [...]
> + dummy_fd = dup(fd);
> + if (dummy_fd < 0)
> + return 0;
> + close(dummy_fd);
> 
> Why not use fstat() instead (does Windows have fstat()? And dup()?).
Windows has dup(), but no fstat().
> + @unittest.skipIf(os.name == 'nt', "test needs POSIX semantics")
> + def test_no_stdin(self):
> 
> It would maybe be more direct with skipUnless(os.name == 'posix').
Hmm, indeed.
> Finally, it's not that important, but it could maybe be possible to
> factorize the code, i.e. make a helper function that takes a list of
> streams and defines the preexec() function and code to test those
> streams, and then just call:
Ah, indeed perhaps.
History
Date User Action Args
2011年11月27日 22:14:18pitrousetrecipients: + pitrou, loewis, doko, exarkun, amaury.forgeotdarc, belopolsky, benjamin.peterson, stutzbach, naufraghi, Arfrever, petere, neologix
2011年11月27日 22:14:17pitroulinkissue7111 messages
2011年11月27日 22:14:17pitroucreate

AltStyle によって変換されたページ (->オリジナル) /