On 4/2/06, Brett Cannon <[EMAIL PROTECTED]> wrote:
> I am not suggesting the default be that everything satisfies a
> protocol. I am thinking about situations like our __index__
> situation; will someone have to explicitly somewhere say that a type
> meets the index protocol even if it does implem
On 4/2/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> This is where I've always come unstuck in thinking about adaptation - actually
> using C++ and VB6 has persuaded me that implicit type conversions are
> generally evil, and there doesn't seem to be anything in adaptation that makes
> it the excep
On Apr 2, 2006, at 7:11 AM, Paul Moore wrote:
...
> On the face of it, there's nothing implicit going on. There has to be
> an explicit adaptation call. However, I agree that systems that make
> extensive use of adaptation can seem to end up in a situation where
> data seems to magically appea
On 4/1/06, Talin <[EMAIL PROTECTED]> wrote:
> This is about the print / writeln debate.
No, it isn't. :-)
Let me focus on the part that you skirt, to explain that that's what
makes anything like this pretty much impossible.
> We would start by defining a simple metalanguage for giving instructio
Python currently supports 'S % X', where S is a strinng, and X is one of:
* a sequence
* a map
* treated as (X,)
But I have some questions about this for python 3000.
1. Shouldn't there be a format method, like S.format(), or S.fmt()?
2. What about using __call__ instead of / in addition to __r
Crutcher Dunnavant wrote:
> Python currently supports 'S % X', where S is a strinng, and X is one of:
> * a sequence
> * a map
> * treated as (X,)
>
> But I have some questions about this for python 3000.
>
> 1. Shouldn't there be a format method, like S.format(), or S.fmt()?
Possible, but why?
Guido van Rossum python.org> writes:
> Based on my experience with past wild proposals, you're probably going
> to counter by proposing that the Python interpreter somehow follows
> imports at compile time; I could then object that it's totally
> reasonable that the module to be imported is unava
Just a few things that have wanted while doing python
programming. Maybe some of these are already doable
or are already on someone's wish list...
-- The __main__ module should contain a file path like imported
modules. in other words, every module should know where it
came from. In fact, I see no
Guido van Rossum wrote:
> On 4/2/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
>> A quick idea of mine: Wouldn't it be useful to maintain a list of what will
>> not change, collected in the discussions here? That way, people eager to
>> suggest
>> braces and whatnot can be referred to it.
>>
>> (I'd
Talin wrote:
> Just a few things that have wanted while doing python
> programming. Maybe some of these are already doable
> or are already on someone's wish list...
Some of these are already pretty easy to do. Perhaps you should
explain what's inadequate about the current solutions. For
example:
On 4/2/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 4/2/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
> > A quick idea of mine: Wouldn't it be useful to maintain a list of what will
> > not change, collected in the discussions here? That way, people eager to
> > suggest
> > braces and whatno
On 02/04/06 Talin said:
> Just a few things that have wanted while doing python
> programming. Maybe some of these are already doable
> or are already on someone's wish list...
It's a minor thing, but it'd be nice to make a method alias for append() on
mutable sequences called push(), to go with
Georg Brandl wrote:
> Crutcher Dunnavant wrote:
>> Python currently supports 'S % X', where S is a strinng, and X is one of:
>> * a sequence
>> * a map
>> * treated as (X,)
>>
>> But I have some questions about this for python 3000.
>>
>> 1. Shouldn't there be a format method, like S.format(), or
Alex Martelli gmail.com> writes:
> for k, v in sorted(d.iteritems()):
Ah, thanks! I didn't know that worked. (The missing piece was
that I wasn't aware that relative comparisons worked on
tuples. I even looked in the library reference manual under
"sequence types")
> A module can be imported se
Thomas Wouters python.org> writes:
> I'm not sure what you're missing. The __main__ module has __file__:
> centurion:~ > cat tmp.py
> print "__file__:", __file__
> import __main__
> print "__main__.__file__:", __main__.__file__
>
> centurion:~ > python tmp.py
> __file__: tmp.py
> __main__.__fi
Alex Martelli wrote:
> On Apr 2, 2006, at 7:11 AM, Paul Moore wrote:
> ...
> [...]
>
> Say, for example, that protocols are identified (as in my strawman
> proposal) by unique strings anyway. E.g., if I were to invent a
> protocol, I could name it 'it.aleax.myprot' -- since I own the
>
Am Sun, 02 Apr 2006 09:29:13 -0700 schrieb Guido van Rossum:
> Just to confirm what's already been said, this was considered very
> carefully and won't change.
OK, thanks.
--
Thomas
___
Python-3000 mailing list
[email protected]
http://mail.pyth
On 4/2/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
> Crutcher Dunnavant wrote:
> > Python currently supports 'S % X', where S is a strinng, and X is one of:
> > * a sequence
> > * a map
> > * treated as (X,)
> >
> > But I have some questions about this for python 3000.
> >
> > 1. Shouldn't there b
On 4/3/06, Talin <[EMAIL PROTECTED]> wrote:
Thomas Wouters python.org> writes:> I'm not sure what you're missing. The __main__ module has __file__:Except that they are not the same!
When I print __file__ from my __main__ module, I get the name of thefile only, no path.You get the path that was use
On 4/2/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
> A quick idea of mine: Wouldn't it be useful to maintain a list of what will
> not change, collected in the discussions here? That way, people eager to
> suggest
> braces and whatnot can be referred to it.
>
> (I'd be volunteering to maintain suc
Georg Brandl wrote:
> PEP: XXX
> Title: Things that will Not Change in Python 3000
>
> ...
>
> Copyright
> =
I was expecting to see something like "The Python licence
will not change" under this heading. :-)
--
Greg
___
Python-3000 mailing li
On Apr 2, 2006, at 4:39 PM, Walter Dörwald wrote:
...
> Why not make the registry identical to the protocol? The protocol
> is just a convention anyway:
Yes, a 1<->1 relationship between registries and protocols makes the
'registryof' function I was talking about simpler, at least when it
On Sun, 2006-04-02 at 22:27 +0200, Georg Brandl wrote:
> BTW, has anyone seen string.Template being used somewhere?
I use it, which shouldn't be a big suprise (though not in much public
code). You'll probably see it get used quite a bit in a future Mailman
release.
-Barry
signature.asc
Descr
On Sun, 2006-04-02 at 22:27 +0200, Georg Brandl wrote:
> Crutcher Dunnavant wrote:
> > Python currently supports 'S % X', where S is a strinng, and X is one of:
> > * a sequence
> > * a map
> > * treated as (X,)
> >
> > But I have some questions about this for python 3000.
> >
> > 1. Shouldn't t
In this thread, Alex has been advocating adaption where types are
adapted to protocols: T->P adaption for short. By contrast, my two
sample implementations have involved Protocol->Protocol adaption where
objects that implement a certain protocol are adapted to another
protocol: P->P adaption f
On Mon, 2006-04-03 at 00:44 +0200, Giovanni Bajo wrote:
> Not me. Surely it'd help if its documentation explained why on earth it has
> been introduced. There are no apparent advantages over the builtin %s
> operator,
> at first sight. Nothing worth using a non-standard non-builtin substitution
>
On Sun, 2006-04-02 at 21:39 +, Talin wrote:
> Just a few things that have wanted while doing python
> programming. Maybe some of these are already doable
> or are already on someone's wish list...
>
> -- The __main__ module should contain a file path like imported
> modules. in other words, ev
Adam DePrince gmail.com> writes:
> One of my more recent abominations, my views PEP, would have addressed
> this nicely. And so would ...
>
> class caselessdict( dict ):
Interesting approach. I'm not sure I like storing two copies of every
key thought.
> sorted( dict.items() )
As I mentio
Michael P. Soulier wrote:
> It's a minor thing, but it'd be nice to make a method alias for append() on
> mutable sequences called push(), to go with pop().
That depends on what value you have in mind for "nice".
There would then be two methods which do exactly the
same thing, and everyone would
Talin wrote:
> -- A mechanism whereby imported modules can import
> symbols from the module that imported them. (Specifically,
> I want to take a bunch of variables in my __main__ module
> and make them accessible to the imported module.)
In my_imported_module.py:
import __main__
def my_s
"Michael P. Soulier" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>It's a minor thing, but it'd be nice to make a method alias for append()
>on
>mutable sequences called push(), to go with pop().
Bound methods to your rescue:
_stack = []
push = _stack.append
pop = _stack.pop
N
Crutcher Dunnavant wrote:
> On 4/2/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
>> Crutcher Dunnavant wrote:
>>> Python currently supports 'S % X', where S is a strinng, and X is one of:
>>> * a sequence
>>> * a map
>>> * treated as (X,)
>>>
>>> But I have some questions about this for python 3000
On 4/2/06, Alex Martelli <[EMAIL PROTECTED]> wrote:
> I believe that such "magically appearing" does not depend on
> adaptation, per se, but on the mix of "convenience" approaches to
> adaptation and registration that one chooses to provide alongside it.
Apologies if I didn't explain myself well -
33 matches
Mail list logo