Proposal for adding symbols within Python

Steven D'Aprano steve at REMOVETHIScyber.com.au
Sun Nov 13 06:10:38 EST 2005


On Sun, 13 Nov 2005 10:11:04 +0100, Pierre Barbier de Reuille wrote:

> The problem, IMHO, is that way you need to declare "symbols"
> beforehands, that's what I was trying to avoid by requiring a new syntax.

???

If you don't declare your symbols, how will you get the ones that you want?

I don't understand why it is a problem to declare them first, and if it is
a problem, what your solution would be.

[snip]

> Well, I don't think enumarated objects ARE symbols. I can see two
> "problems" :
>  1 - in the implementation, trying to compare values from different
> groups raises an error instead of simply returning "False" (easy to fix ...)

As you say, that's easy to fix.

>  2 - You have to declare these enumerable variables, which is not
> pythonic IMO (impossible to fix ... needs complete redesign)

Are you suggesting that the Python language designers should somehow
predict every possible symbol that anyone in the world might ever need,
and build them into the language as predefined things?

If that is not what you mean, can you explain please, because I'm confused.



-- 
Steven.




More information about the Python-list mailing list