Re: ABCs - infix syntax for isinstance() ?

2008-10-09 Thread Boris Borcic
Terry Reedy wrote: Boris Borcic wrote: ... - allowing containment tests, ie x in Number to invoke isinstance() in the background when the container is of type type. My brain is too muddled by flu at the moment, to see whether Guido's fabled time machine allowed him to already provide all

Re: ABCs - infix syntax for isinstance() ?

2008-10-08 Thread Boris Borcic
Bruno Desthuilliers wrote: [EMAIL PROTECTED] a écrit : ... A intriguing wider proposition would be to transpose Ruby's notion of Open Classes to Python built-in metaclasses (or just to type itself ?). No, thanks. Even the Ruby guys start to think making evrything open may not be such a good

Re: ABCs - infix syntax for isinstance() ?

2008-10-07 Thread Boris Borcic
Bruno Desthuilliers wrote: Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; x is None is a *very* common

Re: ABCs - infix syntax for isinstance() ?

2008-10-07 Thread Bruno Desthuilliers
Boris Borcic a écrit : Bruno Desthuilliers wrote: Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; x is None

Re: ABCs - infix syntax for isinstance() ?

2008-10-06 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Bruno Desthuilliers dixit : Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; x is

Re: ABCs - infix syntax for isinstance() ?

2008-10-05 Thread bborcic
Bruno Desthuilliers dixit : Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; x is None is a *very*

ABCs - infix syntax for isinstance() ?

2008-10-03 Thread Boris Borcic
Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; forcing the usage of a function or method to test it, would dissuade abuse. -

Re: ABCs - infix syntax for isinstance() ?

2008-10-03 Thread bearophileHUGS
Boris Borcic: - combining both keywords to create a third one, eg is in A note only on syntax: isa seems better for Python. I don't comment how useful it can be. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: ABCs - infix syntax for isinstance() ?

2008-10-03 Thread Bruno Desthuilliers
Boris Borcic a écrit : Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; x is None is a *very* common test. Using a _marker object

Re: ABCs - infix syntax for isinstance() ?

2008-10-03 Thread Terry Reedy
Boris Borcic wrote: Given the ABC innovation, maybe an infix syntax for isinstance() would be good. Possibilities : - stealing is away from object identity. As a motivation, true use cases for testing object identity are rare; forcing the usage of a function or method to test it, would