Do I always have to write "self." ?
Remco Gerlich
scarblac-spamtrap at pino.selwerd.nl
Sun Apr 30 18:39:20 EDT 2000
Ben Wolfson wrote in comp.lang.python:
> On Sun, 30 Apr 2000 21:27:35 GMT, ben at co.and.co wrote:
>
> >Samuel A. Falvo II <kc5tja at garnet.armored.net> wrote:
> >> I would write something like this:
> >>
> >> uint32 WriteData( void *buffer, char *pString, uint32 cbString )
> >>
> >> This tells me that WriteData() takes as parameters a buffer, a pointer to a
> >> string, and the number of bytes in the said string. I fail to see how this
> >> is somehow hard to read. :)
> >
> >OK, let's bite :-)
> >
> > int WriteData(void *buffer, char *str, int len)
> >
> >I fail to see how this is somehow hard to read :-)
>
> For me, actually, it's easier to read, since I don't have to wonder
> why the int parameter is "cbString". That "cb" means "count of bytes"
> is not intuitively obvious. "len" or "length" is much easier.
For me too. "cbString" sounds like some sort of string. Why is it pString,
but not pBuffer, btw?
--
Remco Gerlich, scarblac at pino.selwerd.nl
12:38am up 55 days, 12:54, 7 users, load average: 0.08, 0.02, 0.01
More information about the Python-list
mailing list