Translating some Java to Python
Diez B. Roggisch
deets at nospam.web.de
Mon May 21 07:24:43 EDT 2007
>
> Hmm,
>
> As an experienced developer I'm rather new to Python, so please forgive me
> any non-Pythonic babbling.
> From a language point you're probably right, but from a design point I'd
> like to have methods that are clearly associated with a class as methods
> of that class, even if they don't use any class or instance related data.
Why so? If they _don't_ use that class, whatfor? I use classmethods for
factory-methods. But that at least needs the _class_ as argument somehow,
and grouping it namespace-wise below the class makes sense.
Otherwise, all they do is allowing for java-programming in python - and that
simply because java lacks module level functions.
Diez
More information about the Python-list
mailing list