Re: What is the naming convention for accessor of a 'private' variable?

2009-11-22 Thread Lie Ryan
Peng Yu wrote: On Wed, Nov 18, 2009 at 8:47 PM, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-20 Thread Steven D'Aprano
On Wed, 18 Nov 2009 18:47:34 -0800, Chris Rebert wrote: On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable in a class. I'm wondering

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-20 Thread Gregory Ewing
Steven D'Aprano wrote: On Wed, 18 Nov 2009 18:47:34 -0800, Chris Rebert wrote: Accessor methods are not Pythonic. Accessor methods are *usually* not Pythonic, at least not the way they are commonly used in Java. To elaborate, accessor methods that *only* read and write another, ordinary

What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Peng Yu
http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable in a class. I'm wondering what is the naming convention for the method that access such variable. - _single_leading_underscore: weak internal use

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable in a class. I'm wondering what is the naming convention for the method that access

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Benjamin Kaplan
On Wed, Nov 18, 2009 at 9:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable in a class. I'm wondering what is the naming convention for the method that access

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Peng Yu
On Wed, Nov 18, 2009 at 8:50 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Wed, Nov 18, 2009 at 9:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Peng Yu
On Wed, Nov 18, 2009 at 8:47 PM, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming convention. Such a variable can be an internal variable in a class.

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Ben Finney
Peng Yu pengyu...@gmail.com writes: The above webpage states the following naming convention. Such a variable can be an internal variable in a class. I'm wondering what is the naming convention for the method that access such variable. A property

Re: What is the naming convention for accessor of a 'private' variable?

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 7:04 PM, Peng Yu pengyu...@gmail.com wrote: On Wed, Nov 18, 2009 at 8:47 PM, Chris Rebert c...@rebertia.com wrote: On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu pengyu...@gmail.com wrote: http://www.python.org/dev/peps/pep-0008/ The above webpage states the following naming