Re: More int and float attributes

2006-08-06 Thread bearophileHUGS
Self: >>D is a very nice language, that I hope to see more used. It is copying >>lot of things from Python. Tim Roberts: >I don't see that. It looks rather like an incremental improvement to C and >C++ rather than a language influenced by Python. Thank you for your comments. Mine was probably j

Re: More int and float attributes

2006-08-06 Thread Robert Kern
Paddy wrote: > Question: do the scientific packages supported by Python supply this > data in a regular manner? For floating point types, at least. In [11]: from numpy import * In [12]: print finfo(float32) Machine parameters for -

Re: More int and float attributes

2006-08-05 Thread Paddy
Paddy wrote: > [EMAIL PROTECTED] wrote: > > Paddy: > > > Or do you mean the ability to choose between hardware supported float > > > s? e.g. float and double precision? > > > > No, I mean just having the ability to ask the float (his attribute) > > what are the max and min values it can represent,

Re: More int and float attributes

2006-08-05 Thread Paddy
[EMAIL PROTECTED] wrote: > Paddy: > > Or do you mean the ability to choose between hardware supported float > > s? e.g. float and double precision? > > No, I mean just having the ability to ask the float (his attribute) > what are the max and min values it can represent, etc. > > stop = float.max

Re: More int and float attributes

2006-08-05 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >sys.maxint gives the largest positive integer supported by Python's >regular integer type. But maybe such attribute, with few others (they >can be called min and max) can be given to int type itself. >D is a very nice language, that I hope to see more used. It is copying

Re: More int and float attributes

2006-08-05 Thread bearophileHUGS
Paddy: > Or do you mean the ability to choose between hardware supported float > s? e.g. float and double precision? No, I mean just having the ability to ask the float (his attribute) what are the max and min values it can represent, etc. stop = float.max ... I don't know any simple way to know

Re: More int and float attributes

2006-08-05 Thread Paddy
[EMAIL PROTECTED] wrote: > sys.maxint gives the largest positive integer supported by Python's > regular integer type. But maybe such attribute, with few others (they > can be called min and max) can be given to int type itself. > D is a very nice language, that I hope to see more used. It is copy

Re: More int and float attributes

2006-08-05 Thread Avizoa
It seems as though just about all of those would be rarely, if ever, used by the vast majority of programmers. Plus, python already handles the two most important (NaN and complex) well. -- http://mail.python.org/mailman/listinfo/python-list

More int and float attributes

2006-08-05 Thread bearophileHUGS
sys.maxint gives the largest positive integer supported by Python's regular integer type. But maybe such attribute, with few others (they can be called min and max) can be given to int type itself. D is a very nice language, that I hope to see more used. It is copying lot of things from Python. D F