Message137740
| Author |
pitrou |
| Recipients |
jcon, nadeem.vawda, neologix, petri.lehtinen, pitrou, rich-noir |
| Date |
2011年06月06日.14:56:05 |
| SpamBayes Score |
1.9651482e-07 |
| Marked as misclassified |
No |
| Message-id |
<1307372162.3506.5.camel@localhost.localdomain> |
| In-reply-to |
<BANLkTi=WBfDjetjObbNK7X_4+9=hbBPYpg@mail.gmail.com> |
| Content |
> If being pretty is the only reason for this choice, then I think that
> documenting the method as
>
> method:: read([n])
>
> is simpler and cleaner .
>
> But you've got much more experience than me, so I won't argue any further :-)
There are contexts where it is easier to give the default argument than
call the method without argument, though, and that's where I find None
more intuitive than -1 :) Arguably it's not very important, though.
> > Can I use _PyIO_ConvertSsize_t? Or should I duplicate its
> > functionality in mmapmodule.c?
>
> I let Antoine answer that.
I'm not sure. This would require including iomodule.h, which is supposed
to be private to the _io module. I think duplicating it is fine, since
the code is probably simple anyway (I'm too lazy to take a look right
now :-)). |
|