Baffled on Windows.

Neil Cerutti horpner at yahoo.com
Thu Jun 7 18:55:02 CEST 2007


On 2007-06-07, Robin Becker <robin at reportlab.com> wrote:
> BartlebyScrivener wrote:
>> On Jun 7, 8:17 am, Neil Cerutti <horp... at yahoo.com> wrote:
> ........
>> A good habit for naming your scripts: If you have a script and you
>> want to name it text.py, or list.py or new.py or old.py or some common
>> name that might be found in the thousand and one other modules and
>> programs in your various installations, just use my_text.py or
>> my_list.py or neil_new.py or something to reduce the chances that
>> you'll be shadowing without knowing it.
>> 
>> rick
>
> using your advice we will start getting problems where my_new
> is shadowed so then we start having to recur and we'll have
> names like
>
> my_my_new.py my_my_list.py ...... my_my_my_new.py .....
>
> I leave as an exercise the algorithm which chooses the
> appropriate version of new/list to use :)

Thanks all for the helpful replies.

I'll just memorize the names of all the Python modules in
existence to eliminate this source of errors once and for all.

Or possibly I'll just rename my scripts things whenever this
happens. ;)

-- 
Neil Cerutti



More information about the Python-list mailing list