Multi-dimensional list initialization
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Nov 7 20:29:59 EST 2012
On 08/11/12 12:06, Oscar Benjamin wrote:
> On 7 November 2012 22:16, Joshua Landau<joshua.landau.ws at gmail.com> wrote:
>> That said, losing:
>> [0] * (2, 3) == [0] * [2, 3]
>> would mean losing duck-typing in general.
There are precedents for this kind of thing; the
string % operator treats tuples specially, for
example.
I don't think it's all that bad if you regard
the tuple as effectively part of the syntax.
--
Greg
More information about the Python-list
mailing list