Re: reference or pointer to some object?

2005-01-12 Thread JCM
Torsten Mohr <[EMAIL PROTECTED]> wrote:
...
> I still wonder why a concept like "references" was not
> implemented in Python.  I think it is (even if small)
> an overhead to wrap an object in a list or a dictionary.

> Isn't it possible to extend Python in a way to use
> real references?  Or isn't that regarded as necessary?

Some think it's unwise.  The ability to modify local variables in your
caller's scope can lead to messiness, especially if the modifiability
isn't evident to the caller (eg. via C's "&").
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Octal notation: severe deprecation

2005-01-14 Thread JCM
[EMAIL PROTECTED] wrote:
...
> In Mythical Future Python I would like to be able to use any base in
> integer literals, which would be better. Example random syntax:

> flags= 2x00011010101001
> umask= 8x664
> answer= 10x42
> addr= 16x0E84  # 16x == 0x
> gunk= 36x8H6Z9A0X

I'd prefer using the leftmost character as a two's complement
extension bit.

0x1  : 1 in hex notation
1xf  : -1 in hex notation, or conceptually an infinitely long string of 1s
0c12 : 10 in octal noataion
1c12 : -54 in octal (I think)
0d12 : 12 in decimal
0b10 : 2 in binary
etc

I leave it to the reader to decide whether I'm joking.
-- 
http://mail.python.org/mailman/listinfo/python-list