[IronPython] private functions within a module

Justin Regele jregele23 at gmail.com
Thu Jun 18 22:35:51 CEST 2009


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.

On Mon, Jun 15, 2009 at 11:34 AM, Michael Foord
<fuzzyman at voidspace.org.uk>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
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>>
>
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090618/2432431f/attachment.html>


More information about the Ironpython-users mailing list