New style classes are classes inherited from class object. Therefore:
class A:
pass
is oldstyle, while
class B(object):
pass
is newstyle.
On Tue, Apr 29, 2008 at 8:29 AM, blaine <[EMAIL PROTECTED]> wrote:
> On Apr 29, 5:32 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> > =?ISO-8859-15?
"Aaron Watters" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|What's up with Tim Peters anyway? I haven't seen much from him for a
while.
I miss him too ;-)
He occasionally responds to tracker or pydev math issues where his unique
knowledge and experience is really needed. (As
On Apr 25, 8:17 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote:
> On 2008-04-25, Martin v. Löwis <[EMAIL PROTECTED]> wrote:
>
> > None is smaller than anything.
>
> According to Tim Peters, this is not true.
>
> See http://bugs.python.org/issue1673405
This is unfortunate. I would advocate
something li
blaine <[EMAIL PROTECTED]> wrote:
> On Apr 29, 5:32 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
>> =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]>
>> wrote:
>> > (FWIW, in 2.x, x>=4?, it's None < numbers < anything else;
>> > numbers are ordered by value, everything else is ordere
On Apr 29, 5:32 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote:
> > (FWIW, in 2.x, x>=4?, it's None < numbers < anything else;
> > numbers are ordered by value, everything else is ordered
> > by type name, then by address, unless
=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote:
> (FWIW, in 2.x, x>=4?, it's None < numbers < anything else;
> numbers are ordered by value, everything else is ordered
> by type name, then by address, unless comparison functions
> are implemented).
Quite apart from Jon poin
Gregor Horvath wrote:
D'Arcy J.M. Cain schrieb:
On Fri, 25 Apr 2008 20:27:15 +0200
Gregor Horvath <[EMAIL PROTECTED]> wrote:
>>> None <= 0
True
Why?
Why not?
Because, from http://www.python.org/dev/peps/pep-0020/ :
Errors should never pass silently.
In the face of ambiguity, refuse the t
Grant Edwards <[EMAIL PROTECTED]> writes:
> On 2008-04-25, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote:
> > On Fri, 25 Apr 2008 20:27:15 +0200
> > Gregor Horvath <[EMAIL PROTECTED]> wrote:
> >> >>> None <= 0
> >> True
> > Everything in Python can compare to everything else.
>
> Not true.
Even mo
On 2008-04-25, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote:
> On Fri, 25 Apr 2008 20:27:15 +0200
> Gregor Horvath <[EMAIL PROTECTED]> wrote:
>> >>> None <= 0
>> True
>>
>> Why?
>
> Why not?
>
>> Is there a logical reason?
>
> Everything in Python can compare to everything else.
Not true.
Pytho
On 2008-04-25, Martin v. Löwis <[EMAIL PROTECTED]> wrote:
> None is smaller than anything.
According to Tim Peters, this is not true.
See http://bugs.python.org/issue1673405
--
http://mail.python.org/mailman/listinfo/python-list
> In my humble opinion, I think that comparisons involving None should
> return None, but I trust that the designers came up with this for very
> good reasons. As far as I know I've never been bitten by it.
It's fixed in Python 3.x. Python 3.x refuses to compare objects unless
one of both objects
Gregor Horvath wrote:
Hi,
>>> None <= 0
True
Why?
Is there a logical reason?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
In early Python, the decision was made that the comparison of *any* two
objects was legal and would return a consistent result. So objects of
differen
On 2008-04-25, Gregor Horvath <[EMAIL PROTECTED]> wrote:
> Hi,
>
> >>> None <= 0
> True
>
> Why?
Comparing objects of differing types produces an undefined
result. Next time you do it, it might return False. (Well,
it's not really going to, but it's allowed to.)
> Is there a logical reason?
For
On Fri, 25 Apr 2008 11:54:23 -0700
Paul McNett <[EMAIL PROTECTED]> wrote:
> In my humble opinion, I think that comparisons involving None should
> return None...
Like relational databases.
--
D'Arcy J.M. Cain <[EMAIL PROTECTED]> | Democracy is three wolves
http://www.druid.net/darcy/
D'Arcy J.M. Cain schrieb:
On Fri, 25 Apr 2008 20:27:15 +0200
Gregor Horvath <[EMAIL PROTECTED]> wrote:
>>> None <= 0
True
Why?
Why not?
Because, from http://www.python.org/dev/peps/pep-0020/ :
Errors should never pass silently.
In the face of ambiguity, refuse the temptation to guess.
Gr
Gregor Horvath wrote:
>>> None <= 0
True
More accurately:
None < 0
True
Why?
Is there a logical reason?
None is "less than" everything except for itself:
>>> None < 'a'
True
>>> None < False
True
>>> None == None
True
In my humble opinion, I think that comparisons involving None shoul
On Fri, 25 Apr 2008 20:27:15 +0200
Gregor Horvath <[EMAIL PROTECTED]> wrote:
> >>> None <= 0
> True
>
> Why?
Why not?
> Is there a logical reason?
Everything in Python can compare to everything else. It is up to the
programmer to make sure that they are comparing reasonable things.
--
D'Arc
None <= 0
> True
>
> Why?
> Is there a logical reason?
None is smaller than anything. The choice of
making it so is arbitrary, however, Python 2.x
tries to impose a total order on all objects (with varying
success), therefore, it is necessary to take arbitrary
choices.
(FWIW, in 2.x, x>=4?
Hi,
>>> None <= 0
True
Why?
Is there a logical reason?
Gregor
--
http://mail.python.org/mailman/listinfo/python-list
19 matches
Mail list logo