Implicit lists

Christian Tismer tismer at tismer.com
Thu Jan 30 22:50:16 EST 2003


Greg Ewing (using news.cis.dfn.de) wrote:
> Dale Strickland-Clark wrote:
> 
>> dbTable('tblMembers', keyField='memberID')
>> dbTable('tblPermissions', keyField=('memberID', 'permissionID'))
>>
>> Turning the first keyField into a single item list (or tuple) looks
>> untidy.
> 
> 
> 
> You could use two different keyword parameters
> depending on whether you want to pass a single
> item or a list. e.g.
> 
> dbTable('tblMembers', keyField = 'memberID')
> dbTable('tblPermissions', keyFields = ('memberID', 'permissionID'))

That's a very clean proposal, avoiding all the mess.
While I have to repeat that I'd really like to
see the sequence-ness of strings to be deprecated.
I have no objection to accept tuple(string) or
list(string) as valid operations to create
sequences from strings.
But I almost never have seen a really useful
application of string's default sequenceness.
Compared to all the mess raised in this thread,
it isn't worth it.

Guido, please make strings into atoms.

why-is-an-integer-not-the-sequence-of-its-digits- ly y'rs - chris






More information about the Python-list mailing list