[Tutor] Is nesting functions only for data hiding overkill?

2019-08-21 Thread James Hartley
Yes, nesting functions is valuable & necessary for closures and wrapping
functions for creating properties.  But is nesting, simply for hiding data,
a preferred solution?  I have a number of member functions which are
prefaced with underscores pointing out that they should not
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Is nesting functions only for data hiding overkill?

2019-08-21 Thread James Hartley
Yes, nesting functions is valuable & necessary for closures and wrapping
functions for creating properties.  But is nesting, simply for hiding data,
a preferred solution?  I have a number of member functions which are
prefaced with underscores pointing out that they should not be called by
client code.  Is nesting considered Pythonic?

Thanks!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Is nesting functions only for data hiding overkill?

2019-08-21 Thread Cameron Simpson

On 22Aug2019 00:53, James Hartley  wrote:

Yes, nesting functions is valuable & necessary for closures and wrapping
functions for creating properties.  But is nesting, simply for hiding data,
a preferred solution?  I have a number of member functions which are
prefaced with underscores pointing out that they should not


I think you're not using "nesting" the way I think of it. Can you 
provide an example bit of code illustrating what you're thinking of and 
explaining your concerns? Also, your paragraph looks a little truncated.


Cheers,
Cameron Simpson 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor