[Baypiggies] Idiotmatic Savanica
aleax at google.com
Tue May 15 06:20:00 CEST 2007
On 5/14/07, Warren Stringer <warren at muse.com> wrote:
> Cool; it works! Your suggestion about simplifying __setattr__ seems to work,
> as well.
> I like encapsulating any redundancy into a def – which is another form of
> documentation. So, took your suggestion about adding a _setInChild(name).
> I did diverge, shown here:
> www.muse.com/tr3/tr3_martelli_tweaked.py ; with some
> trepidation, I use double underscores for __setInChild__ and __ok_attrs__ .
> Why? Because it simplifies watching variables, during debug. The ActiveState
> IDE for Visual Studio hides attributes with __myname__ convention. Does any
> other IDE do this? Tracing through thousands of embedded dictionaries will
> be much easier.
Looks like you're trying to take advantage of a weird special feature
of your IDE and thereby violating Python conventions (_in theory_ the
whole set of names starting and ending with two underscores is
reserved to the Python implementers -- we might add one clashing with
your use anytime w/o warning -- of course, it's _unlikely_ to actually
> Heh, just had an odd thought; I've probably spent as much time reading
> Martelli as Tolstoy…
Oops, I must definitely take steps to become more concise...!!!
More information about the Baypiggies