Why did Quora choose Python for its development?

Daniel Kluev dan.kluev at gmail.com
Mon May 23 23:34:52 EDT 2011


On Mon, May 23, 2011 at 10:10 PM, Octavian Rasnita <orasnita at gmail.com> wrote:
> is not so nice as
>
> $d = @a;

It is 'not so nice' only in your perception. Python clearly defines
dict as container of (key, value) pairs, and therefore its constructor
expects such pairs. Adding unjustified arbitrary ways to guess such
pairs out of linear list is exactly what is being bashed here. Is is
considered to be wrong and bad.

Moreover, you are comparing apples to oranges here, and then
complaining that apples somehow turned out to be not oranges.
If we take python way of defining dicts and check it in perl, we find
that it is not supported, so obviously perl is non-intuitive and does
not support clear and easy way of defining hashes from list of
key-value pairs:

@l = ([1, 2], [3, 4],);
%d = @l;
for $k ( keys %d ) { print "$k\n"; }

which outputs single ARRAY(0x804e158) instead of proper 1, 3, as it
does in python:

>>> dict([[1,2], [3,4]]).keys()
[1, 3]

This is yet another example that you are just trolling here, making
silly and unbacked claims, and ignoring any valid arguments you
receive.

-- 
With best regards,
Daniel Kluev



More information about the Python-list mailing list