Verbose and flexible args and kwargs syntax
Eelco
hoogendoorn.eelco at gmail.com
Tue Dec 13 04:50:18 EST 2011
More information about the Python-list mailing list
Tue Dec 13 04:50:18 EST 2011
- Previous message (by thread): Verbose and flexible args and kwargs syntax
- Next message (by thread): Verbose and flexible args and kwargs syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> To answer that question: for the same reasons. The conversion is > wasteful; allowing python to do the right thing based on a > typeconstraint is not. Plus, it is less code, and more readable code; > the only rule you have to learn is quite general, which is that :: is > a type constraint annotation; no need to remember specifics, like > 'unpacking always returns lists for some arbitrary reason'. Oh my bad; actually, that should be: 'collecting the remainder of an unpacked iterable using * will always yield a list. That is, unless the construct appears inside a function definition; then somehow a tuple is always the right choice'
- Previous message (by thread): Verbose and flexible args and kwargs syntax
- Next message (by thread): Verbose and flexible args and kwargs syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list