Mike Krell wrote:
> On 5/11/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>
>>I think I'm more comfortable with a maximal taxonomy. In a maximal
>>taxonomy, I'd describe a large set of invariants, attributes,
>>behavior, etc., and say e.g. "this is how a file behaves". A
>>particular class can t
Marcin 'Qrczak' Kowalczyk wrote:
> Talin <[EMAIL PROTECTED]> writes:
>
>
>> # Use as a function argument constraint
>> @generic
>> def flatten( x:concepts.iterable ):
>> ...
>>
>> # Another overload
>> @generic
>> def flatten( x:concepts.associative ):
>
> How are concepts def
At 02:50 PM 5/12/2006 +1200, Greg Ewing wrote:
>These are large assumptions, which I suspect are at
>least 87.43% wrong. Don't make the mistake of thinking
>that everyone has the same preferences as you.
And that's about 51.7% patronizing; don't make the mistake of thinking that
my assumption was
Phillip J. Eby wrote:
> I meant only the shift from typing "def __iter__(" to "defop iter(",
> irrespective of how it's implemented.
On its own, that's no more than a syntax change,
with very little to recommend it. With the associated
semantics you propose, it's a very deep change indeed.
> My
On 5/11/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> In other words, I mean that if most people saw something like this in
> "What's new in Python 3.0", I don't think they would freak out:
>
> """Removal of __magic__ attributes
>
> Special attribute names like '__iter__' have been replaced with
At 11:39 AM 5/12/2006 +1200, Greg Ewing wrote:
>Phillip J. Eby wrote:
>>I'm only showing this example because I think getting rid of
>>__magic_names__ for operations could be a good thing for readability, and
>>it would remove an element of "magic" from today's Python.
>
>Although overloadable fu
Fredrik Johansson wrote:
> Are people still positive regarding the idea of merging decimal and
> binary floats into the same type? (Or at least ensuring that they can
> be mixed seamlessly,
Er, I thought Decimals were explicitly designed *not*
to merge seamlessly with floats, so that one can't
ac
Talin <[EMAIL PROTECTED]> writes:
># Use as a function argument constraint
>@generic
>def flatten( x:concepts.iterable ):
> ...
>
># Another overload
>@generic
>def flatten( x:concepts.associative ):
How are concepts defined?
How is it determined which specializatio
tomer filiba wrote:
> b=B() # error, A.__init__ expects an instanc of A
>
> why is this kind of type-checking enforced by the language?
Since type-class unification, there is no clear boundary
between built-in and user-defined classes. Any class can
potentially add C-level data to its instances
Phillip J. Eby wrote:
> I'm only showing this example because I think getting rid of
> __magic_names__ for operations could be a good thing for readability, and
> it would remove an element of "magic" from today's Python.
Although overloadable functions are themselves somewhat
magical, so this c
On 5/11/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Well, remember that the default use of type annotations is to ignore
> them! You can write your own decorator that implements a specific
> interpretation of the annotations, and you can make it do anything you
> like.
>
> I think it would be
Guido van Rossum python.org> writes:
> The claim should be introspectable. *Conformance* to the claimed API
> may be hard to introspect but IMO the claims should be introspectable,
> separate from whatever we (think we) know about hasattr().
I sense convergence. Woot! :)
Here's a rough sketch o
Fredrik Johansson wrote:
>
>Are people still positive regarding the idea of merging decimal and
>binary floats into the same type? (Or at least ensuring that they can
>be mixed seamlessly, which should be no problem with decimal literals
>added to the language.)
>
IMO, the free mixing decimal an
On 5/11/06, Fredrik Johansson <[EMAIL PROTECTED]> wrote:
...
> operators could be overloaded as well (to define mpf()+Decimal(), say)
Actually, gmpy currently does it by monkeypatching decimal.Decimal
(sigh) -- I believe that's only in the CVS HEAD, not yet in the
released gmpy version (I'm not
On 5/11/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> I think I'm more comfortable with a maximal taxonomy. In a maximal
> taxonomy, I'd describe a large set of invariants, attributes,
> behavior, etc., and say e.g. "this is how a file behaves". A
> particular class can then claim to be a file
On 5/11/06, Mike Krell <[EMAIL PROTECTED]> wrote:
> On 5/11/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > I think I'm more comfortable with a maximal taxonomy. In a maximal
> > taxonomy, I'd describe a large set of invariants, attributes,
> > behavior, etc., and say e.g. "this is how a file b
On 11-mei-2006, at 21:06, Jan Claeys wrote:
> Op ma, 08-05-2006 te 11:59 -0400, schreef Fred L. Drake, Jr.:
>> Yes, there is a good reason for Tkinter to be separate. There's
>> not a good
>> reason for distutils to be separate.
>
> Why would ordinary end-users of an application written in Pyt
Hi all,
Some assorted thoughts:
Python's current numeric model has serious problems. It's fine for
calculating with nothing but floats, or nothing but ints, but writing
code that works for ints, floats, complexes *and* Decimals - let alone
for custom types such as mpfs or numeric arrays - is near
On Thursday 11 May 2006 15:06, Jan Claeys wrote:
> Why would ordinary end-users of an application written in Python need
> distutils? They will get their application as a py2exe executable (or
> similar) on Windows, as a distro package on linux and on Mac OS X there
> is py2app IIRC. And even
Op ma, 08-05-2006 te 11:59 -0400, schreef Fred L. Drake, Jr.:
> Yes, there is a good reason for Tkinter to be separate. There's not a good
> reason for distutils to be separate.
Why would ordinary end-users of an application written in Python need
distutils? They will get their application as
Jim Jewett wrote:
>There are languages (Self; I think even javascript) whose OO is based
>on Prototypes rather than classes. If an object doesn't have the
>attribute/method, then check its prototype (and so on recursively).
>
>When I have to emulate this in python (or Java), I just try to shove
>
On 5/11/06, Talin <[EMAIL PROTECTED]> wrote:
> Some of the other open issues with signatures are as follows:
>
> o How to use the signature to be able to predict which input arguments
> are going to map against which formal parameters.
Well, there's supposed to be an algorithm defined by the lan
Guido van Rossum wrote:
> On 5/11/06, Talin <[EMAIL PROTECTED]> wrote:
>
>> The word 'sequence' here doesn't mean an exclusive category. In a sense,
>> all sequences are really mappings - they "map" a range of integers to
>> values.
>
>
> No, the requirements for sequence-ness are stronger. The
On 5/11/06, Talin <[EMAIL PROTECTED]> wrote:
> The word 'sequence' here doesn't mean an exclusive category. In a sense,
> all sequences are really mappings - they "map" a range of integers to
> values.
No, the requirements for sequence-ness are stronger. The set of ints
mapped must be exactly rang
On 5/11/06, tomer filiba <[EMAIL PROTECTED]> wrote:
> class myFrame(derive_of(c.modules.wx.Frame)):
> ...
> c.modules.wx.Frame is a proxy (instance) to a remote type, so you can't
> derive from it directly. therefore, derive_of is
> def derive_of(proxy_type):
> class cls(object):
>
Nick Coghlan wrote:
> Talin wrote:
>
>> I haven't forgotten that you asked me to write up a PEP for a
>> signature API in conjunction with the keyword arguments PEP. However,
>> I don't yet feel that the ideas have gelled enough to do so yet -- or
>> at least, I don't feel competent to come up
[Guido]
> > You seem to be still under the influence of the type-safety mafia, who
> > want to make you believe that with enough type-checking you can
> > prevent all bugs (though they don't believe it themselves).
[Talin, quoetd by Guido]
> >> I think that I agree with the gist of Tomer's point.
Ideally, if we get the signature API that's been discussed, then lists
and tuples and such would have a constraint on their __getitem__ method:
def __getitem__( self, index:int ):
...
Thus, the concept testing code could look to see what types are
acceptable to the __getitem__ method
The word 'sequence' here doesn't mean an exclusive category. In a sense,
all sequences are really mappings - they "map" a range of integers to
values.
From the standpoint of accepting an argument, we really don't care
whether something is a sequence or a mapping, we care about what we can
do
On 5/11/06, Talin <[EMAIL PROTECTED]> wrote:
> sequence( indexable ):
> -- an indexable in which the indexes are successive integers
> -- Test: isinstance( index_type, int )
I think as of Python 2.5, this should be hasattr(index_type, '__index__'), no?
> mapping( indexable ):
> -- an
"Guido van Rossum" python.org> wrote
> You seem to be still under the influence of the type-safety mafia, who
> want to make you believe that with enough type-checking you can
> prevent all bugs (though they don't believe it themselves).
~~
>> I think that I agree with the gist of Tomer's point.
>
Le jeudi 11 mai 2006 à 10:00 -0600, Travis E. Oliphant a écrit :
>
> That sounds reasonable. As I said before, I like the idea of PyGUI.
> My main consternation is wxWindows. I'm not a big fan of how wxPython
> builds on top of wxWindows which builds on top of GTK which itself
> builds on G
At 04:27 PM 5/11/2006 +0100, [EMAIL PROTECTED] wrote:
>Why not
>
>class Foo(object):
> @specialize(arg(0))
> def core.len(self)
> ...
Where does 'core' come from? What is specialize for? I don't understand
what you're proposing.
>I don't know how this would app
> So my thought is this: How hard would it be to make
> a curses-based debugger?
Long as it works in my Emacs shell buffer...
Bill
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http
Marcin 'Qrczak' Kowalczyk wrote:
> "Neal Norwitz" <[EMAIL PROTECTED]> writes:
>
>> Another benefit of this is the ability to get more info through
>> introspection. Right now, you can't even find the number of
>> arguments of a function implemented in C. You only know if it takes
>> 0, 1, or varia
Greg Ewing wrote:
> Travis E. Oliphant wrote:
>> The only thing I would wish different is to get rid of the PyGTK
>> dependency. I think PyGUI should be a wrapper directly on top of GNOME
>
> Perhaps you have Gnome and Gtk confused? Gnome is the
> desktop, Gtk is the UI library that Gnome appli
On 5/11/06, Bill Birch <[EMAIL PROTECTED]> wrote:
> On Thu, 11 May 2006 12:38 am, you wrote:
> > On 5/10/06, Bill Birch <[EMAIL PROTECTED]> wrote:
> > > A simple test to see where your thinking is at. Consider:
[...]
> > Clearly False - D() is not an object of type I1.
> >
> > Of course, whether is
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote on 11/05/2006 16:09:47:
> At 10:12 AM 5/11/2006 +0100, [EMAIL PROTECTED] wrote:
> >A dynamic version of concepts (I guess a combo of multi-methods and
> >adaptation) would be great for Python, but it's hard to see how it
could
> >be done simply and effic
At 10:12 AM 5/11/2006 +0100, [EMAIL PROTECTED] wrote:
>A dynamic version of concepts (I guess a combo of multi-methods and
>adaptation) would be great for Python, but it's hard to see how it could
>be done simply and efficiently.
Go back and read the post where I explained how, then. ;)
Seriousl
Talin <[EMAIL PROTECTED]> writes:
> sequence( indexable ):
> -- an indexable in which the indexes are successive integers
> -- Test: isinstance( index_type, int )
I don't understand. How would this test distinguish [] being a
sequence from {} not being a sequence?
> mapping( indexable ):
"Neal Norwitz" <[EMAIL PROTECTED]> writes:
> Another benefit of this is the ability to get more info through
> introspection. Right now, you can't even find the number of
> arguments of a function implemented in C. You only know if it takes
> 0, 1, or variable # of arguments and if it accepts keyw
Talin wrote:
> Guido van Rossum wrote:
>> I think it would be useful to have a notation that can express
>> signatures. I haven't spent much time thinking about what this would
>> look like, but I'd like it to require no new syntax beyond the concept
>> of type annotations. If this means you can't
On Thu, 11 May 2006 03:30 pm, Guido van Rossum wrote:
>
> Bill Janssen is proposing that the specific thing a type must do is
> inherit from some abstract base class.
>
> Phillip Eby is countering that that isn't sufficient because he wants
> to be able to make up his own categories and apply thes
Marcin 'Qrczak' Kowalczyk wrote:
> "tomer filiba" <[EMAIL PROTECTED]> writes:
>
>> one thing that worries me with generic methods is, they would
>> dispatch based on types... which means my proxies would all break.
>> please, think of the proxies! ;)
>
> OTOH proxies generated by my Python<->Kogu
Bill Janssen wrote:
>> to want to task a general GUI toolkit with producing
>> HTML and Javascript, running a HTTP server, and automagically dealing
>> with all the server-side logic seems a bit like a really bad joke.
>
> You've never looked at X11 under the covers (it looks like Mac OS X's
> win
[EMAIL PROTECTED] wrote on
10/05/2006 17:39:57:
> At 11:21 AM 5/10/2006 +0100, [EMAIL PROTECTED] wrote:
> >Have you taken a look at ConceptGCC? (
> >http://www.osl.iu.edu/~dgregor/ConceptGCC/)
> >
> >It's basically a first cut at implementing the Concepts which will be
> >availiable in the next v
On 11-mei-2006, at 8:45, Talin wrote:
> Josiah Carlson wrote:
>> Having identical behavior on all platforms is wonderful, I'm very
>> happy
>> for you and everyone else with a toolkit (programming language,
>> etc.) that
>> does the same. For the rest of us who cannot use PyQt for one
>> re
47 matches
Mail list logo