Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> some simple examples showing the syntax would go a long way.

Sorry, there as just too many ways to go and we are intentionally not stating 
which way is preferred.  I've seen many variants  a:[Integral] for a list of 
integers, a:(int,str) for a 2-tuple of an int and a string, a:(str,file,None) 
for something that is a string or a file or None, a:'light_years' to indicate 
units of measure, a:range_check(10.5, 20.1) for range validation, and some 
variants for converters, adapters, factory functions, documentation aids, etc.

If you want to advance the state of the art, perhaps write a blog post on what 
you consider to be a best practice.  If a consensus emerges, we 
will follow.

----------
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12195>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to