This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients JJeffries, docs@python, eric.araujo, rhettinger
Date 2011-08-26.16:49:09
SpamBayes Score 2.2279588e-05
Marked as misclassified No
Message-id <1314377351.18.0.963573194409.issue12195@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2011-08-26 16:49:11rhettingersetrecipients: + rhettinger, eric.araujo, docs@python, JJeffries
2011-08-26 16:49:11rhettingersetmessageid: <1314377351.18.0.963573194409.issue12195@psf.upfronthosting.co.za>
2011-08-26 16:49:10rhettingerlinkissue12195 messages
2011-08-26 16:49:09rhettingercreate