[Pyobjc-dev] Underscores in methods/instance variables
Brought to you by:
ronaldoussoren
|
From: Orestis M. <or...@or...> - 2009-03-27 14:46:14
|
Hello all, I want to clarify a bit the advice of the documentation to *not* use the Python conventions of not using leading underscores for "private" instance attributes. Is it the danger of accidentally overwriting some other Obj-C attribute if there's a name clash? What about methods with leading underscores? I fully understand that in order a method to be accessible from Obj-C code it has to follow the methodWithArg_andArg_(self, arg1, arg2) convention. In my case, these are "private" methods that I have no desire to expose to anyone. The class in question is just a delegate that implements a custom init method and the delegate method. These are the only things that use the obj-c convention. The rest of the code is using the Python convention, with leading underscores in attributes and methosd, property decorators and so on. Testing indicates that things are working perfectly fine, I'm just worried that there may some stability issues that may not visible at this point. I've heard rumours of hard crashes that may have been related to this, so I'm a bit worried. Thanks, Orestis -- or...@or... http://orestis.gr/ |