dict view to list

Rhodri James rhodri at wildebst.demon.co.uk
Sun Mar 29 19:15:48 EDT 2009


On Sun, 29 Mar 2009 08:39:10 +0100, Aaron Brady <castironpi at gmail.com>  
wrote:

> I guess there are two arguments for the change.
>
> 1.  Flat is better than nested.

I don't think that's really what this is refering to.

> 2.  It interferes with the way people read text.

Insert "some" before "people" and I'd have to agree.

> The order of events are: First, get the view.  Then convert it to a
> list.  Hence, dictA.get_view( ).to_list( ).

Alternatively, "get the list of dictA's view," or
list(dictA.get_view()).  Both are legitimate text, after all.

> This may call for a more fundamental change to a programming language
> than Python should make; and it may have to wait for another
> generation.  It entails that function applications should be of the
> form '( x )f' instead of 'f( x )', in a pretty general way.

Sorry, but if what you're describing isn't essentially calling a
method, then I don't understand the point you're trying to make.
If it is, you still need to address Terry's point about why lists
get the special treatment and not other built-in types.

> I also recognize that natural language and thus human thinking does
> admit of a certain depth of nesting.  English, notably, has two means
> of nesting, at least in the possessive case.  'The mother of
> invention' and "invention's mother".  Here is a predicate example too:
> 'The cat is on the mat' and 'On the mat is the cat', although the late
> is mostly unattested-to these days.

Erm, this isn't what I understand by 'nesting' in language, which has
more to do with how many subclauses, like these, you can cope with
being active at any one time before you forgot what the sentence
started off being about :-)

-- 
Rhodri James *-* Wildebeeste Herder to the Masses



More information about the Python-list mailing list