Message163555
| Author |
neologix |
| Recipients |
giampaolo.rodola, larry, loewis, neologix, serhiy.storchaka, vstinner |
| Date |
2012年06月23日.08:59:31 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1340441973.36.0.804701089333.issue15078@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> What's wrong with mmap? It uses list of optional arguments (`flags`,
> `prot`, `access`) and not only one `flags` argument.
Of course it does, as the mmap syscall(), since this arguments have nothing to do with one another.
I was refering to your proposal of splitting sendfile's `flags` argument, which is currently a bitmask, into distinct arguments (diskio=True, wait=True, sync=False).
If we did this for, let's say, mmap() `flags`, this would end up in a bazillion optional arguments, because there a re so many possible values for `flags` (MAP_SHARED, MAP_PRIVATE, MAP_ANONYMOUS, MAP_DENYWRITE...).
Bitmasks are a clear and compact way to pass optional arguments, and should be kept. |
|