Justin Regele wrote:
As of Python25, there is no thing as a 'private' method, although the
_method() convention is what is generally used.
also, staticmethod(objfunc) is used to make a method static. don't
know if yo already know this. rather an annoying way of doing it.
class Static(object):
@staticmethod
def method():
print 'this is a static method'
Static.staticmethod()
Not that you need them in Python - functions or class methods
(@classmethod) are almost always better.
Michael
On Mon, Jun 15, 2009 at 11:34 AM, Michael Foord
<[email protected] <mailto:[email protected]>> wrote:
Elise Langham (Elanit) wrote:
How can i define some functions within a module as private ?
Do i need to make them part of a static class ? or is this
this not possible?
The convention is to start their names with an underscore. That
will tell other developers not to call them directly.
Michael
Thanks,
Elise
------------------------------------------------------------------------
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
------------------------------------------------------------------------
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com