Raymond Hettinger wrote:

>     def contact_info_update(timestamp, sequence_number, (name, address, 
> phone, 
> email), backup=True):

Things like that are probably better done with something
like the named-tuple idea that was discussed recently.

Writing code that depends on long sequences having things
in particular positions is an anti-pattern, IMO. It's
convenient at first, but it rapidly becomes unmaintainable.
I wrote a lot of code like that in one of my recent projects,
and it's one of the first things I'll change if I get around
to re-doing it.

> Another example comes from a spherical navigation module with several tuple
> representations for movement  (lat_offset, long_offset) versus (dist, 
> direction).

That could be addressed by giving the arguments descriptive
names, such as lat_long and dist_dir.

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to