Jose Amoreira wrote:
Hi.
This is a question about style. I have a class definition that calls a
small auxiliary function. Because this function isn't used anywhere
else, I'd like to include it inside the class definition.


*shrug*

Then do so.

class Whatever:
    @staticmethod
    def is_odd(k):
        return k % 2 == 1


but really, this is Python, not Java. Feel free to write top level functions.



--
Steven

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to