A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/066143.html below:

Allow Empty Subscript List Without Parentheses

[Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses [Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses"Martin v. Löwis" martin at v.loewis.de
Sat Jun 17 21:09:06 CEST 2006
Noam Raphael wrote:
> I meant the extra code for writing a special class to handle scalars,
> if I decide that the "x[()]" syntax is too ugly or too hard to type,
> so I write a special class which will allow the syntax "x.value".

What I cannot understand is why you use a zero-dimensional array to
represent a scalar. Scalars are directly supported in Python:

x = 5

Also, in an assignment, what are you putting on the right-hand side?
A read access from another zero-dimensional array?

I think this feature is so esoteric that it would actually hurt the
language to have it.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4