How would I write this C code in Python?

DeveloperX ccpsceo at gmail.com
Wed Jul 11 00:06:54 EDT 2007


On Jul 10, 5:05 am, Bruno Desthuilliers <bruno.
42.desthuilli... at wtf.websiteburo.oops.com> wrote:
> Mmm... We can't tell for sure since we have no use case, but I'm not
> sure that the OP wants an immutable object here.
>
> > or an `array.array`.
>
> or a StringIO.
>
> >  And is `BLOCK`
> > really just a structure with *one* member?  Looks a bit odd IMHO.
>
> +1
>
> <OP>
> Unless you have behaviours attached to this type, you may as well just
> use lists.
> </OP>
>
> And while we're at it, Python's conventions are that ALL_UPPER names
> denotes (pseudo) constants. For types, the conventions is to use
> CantRememberIfItsCamelOrMixedCaseButYouShouldGetTheIdeaByNow.
>
> HTH

I just used the same convention that the C code used in this post.
I write my python classes and functions in CamelCaps.

Not completely certain what to do at this point.




More information about the Python-list mailing list