Re: [Python-3000] [Python-Dev] Iterable String Redux (aka String ABC)

2008-05-27 Thread Benji York
perhaps there should be an ABC that things like lists and tuples provide, but strings don't. No idea what that might be. -- Benji York ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Re: [Python-3000] Will standard library modules comply with PEP 8?

2007-08-28 Thread Benji York
it with a > capital 'V'? ;) > > On the one hand, I really like consistency in my programming languages. > On the other hand, a foolish consistency is the hobgoblin of little minds. I call quote misapplication. Having predictable identifier names isn't "

Re: [Python-3000] No (C) optimization flag

2007-08-11 Thread Benji York
n pickle itself? I believe he's talking about a situation where pickle calls back into Python. -- Benji York http://benjiyork.com ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe:

Re: [Python-3000] New section for PEP 3124

2007-07-25 Thread Benji York
ill really do that, but at least the irony would be worth it. -- Benji York http://benjiyork.com ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/o

Re: [Python-3000] exclusion feature for 2to3?

2007-07-18 Thread Benji York
Alexandre Vassalotti wrote: > I expect other tools, like pdb.py and trace.py could follow this > convention as well. For example: I used the time machine to convince the author of trace.py use this convention. He didn't like your spelling, but eventually agreed to #pragma NO COVER

Re: [Python-3000] doctests vs. unittests (was Re: pimp; restructuring the standard library)

2007-06-29 Thread Benji York
quite a bit nicer. If you write your "whole file" doctests in ReST, you can also render them to HTML as is done for the packages we put in pypi (here's a short example: http://cheeseshop.python.org/pypi/zc.queue/1.1, ReST source at http://svn.zope.or

Re: [Python-3000] On PEP 3116: new I/O base classes

2007-06-19 Thread Benji York
is from the current >> location. > > Presumably this would go along with introducing a new "wink" method. > I wonder what it would do. (Close the file briefly?) That's a great idea! It can be called in response to a HUP to rotate log files. me.wink()-ly y'r

Re: [Python-3000] [Python-Dev] Python 3000 Status Update (Long!)

2007-06-19 Thread Benji York
Joachim König wrote: > could someone enlighten me why > > {,} > > can't be used for the empty set, analogous to the empty tuple (,)? Partially because (,) is not the empty tuple, () is. -- Benji York http://benjiyork.com ___ Pyth

Re: [Python-3000] PEP 3133: Introducing Roles

2007-05-17 Thread Benji York
Guido van Rossum wrote: > On 5/16/07, Benji York <[EMAIL PROTECTED]> wrote: >> Guido van Rossum wrote: >>> On 5/14/07, Benji York <[EMAIL PROTECTED]> wrote: >>>> Collin Winter wrote: >>>>> PEP: 3133 >>>>> Title: Introducing Ro

Re: [Python-3000] PEP 3133: Introducing Roles

2007-05-16 Thread Benji York
Guido van Rossum wrote: > On 5/14/07, Benji York <[EMAIL PROTECTED]> wrote: >> Collin Winter wrote: >>> PEP: 3133 >>> Title: Introducing Roles >> Everything included here is included in zope.interface. See in-line >> comments below for the analogs. >

Re: [Python-3000] PEP 3133: Introducing Roles

2007-05-14 Thread Benji York
import verifyObject >>> verifyObject(Guard, our_robot) True > Concrete methods are required to match exactly the signature demanded > by the role. Here, we've attempted to fulfill our role by defining a > concrete version of ``bark()``, but we've miss

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-11 Thread Benji York
Eric V. Smith wrote: > Benji York wrote: >> zope.interface also allows "lazy" imports using string versions of >> module names in specific circumstances where circular dependencies are >> common. > > Could you give an example of that? I'm familiar

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-11 Thread Benji York
ng a string > import, before I got there. zope.interface also allows "lazy" imports using string versions of module names in specific circumstances where circular dependencies are common. -- Benji York http://benjiyork.com ___ Python-3000 m

Re: [Python-3000] ABC's, Roles, etc

2007-05-10 Thread Benji York
Phillip J. Eby wrote: > At 06:11 PM 5/9/2007 -0400, Benji York wrote: >> By way of clarification: Even in the large Zope 3 projects I work on >> (which obviously use zope.interface), we virtually never use >> interfaces for LBYL (just as Zope 3 itself rarely does). >

Re: [Python-3000] ABC's, Roles, etc

2007-05-09 Thread Benji York
rification is done). My point is, people generally use zope.interface Interfaces as documentation and names for particular behavior/API, not as an LBYL enforcement mechanism. -- Benji York http://benjiyork.com ___ Python-3000 mailing list Python-3000@python.

Re: [Python-3000] [Python-Dev] PEP 30XZ: Simplified Parsing

2007-05-03 Thread Benji York
^ > SyntaxError: EOL while scanning single-quoted string > In the first case, it's treated as a continuation character even though > it's not at the end of a physical line. So it gives an error. No, that is unrelated to line continuation. The \" is an escap

Re: [Python-3000] Discussions with no PEPs

2007-03-13 Thread Benji York
argument (from many corners) now that it seems ABCs are destined to appear in 3.0. If 3.0 /is/ going to give the "typecheck" ability to basic types, then the argument is: should it be ABCs, interfaces, generic functions, or something else. -- Benji York http://benjiyork.com ___

Re: [Python-3000] Discussions with no PEPs

2007-03-12 Thread Benji York
) with a generic function individuals could add implementations for that return True? -- Benji York http://benjiyork.com ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.py

Re: [Python-3000] Discussions with no PEPs

2007-03-11 Thread Benji York
Greg Ewing wrote: > Barry Warsaw wrote: > >> We already have an established, community accepted implementation of >> interfaces, > > Really? Which one is that? I believe Barry was referring to zope.interface. -- Benji Y

Re: [Python-3000] A better way to initialize PyTypeObject

2006-11-29 Thread Benji York
send you copies of messages you were sent directly via the "Avoid duplicate copies of messages?" option. -- Benji York ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://ma

Re: [Python-3000] Abilities / Interfaces

2006-11-22 Thread Benji York
ys; read, write, etc.). These (especially the marker interfaces) don't seem to be statements about what the objects can do (abilities), but about other characteristics, therefore a more general name like "interface" seems appropriate. -- Benji York

Re: [Python-3000] PEP 3102 comments

2006-05-24 Thread Benji York
Antoine Pitrou wrote: > Le mercredi 24 mai 2006 à 17:15 -0400, Benji York a écrit : > >>In that case, just use the current default value syntax, sans value (d, >>below): >> >>def f(a, b, c=None, d=): > > Then we can't decide whether "c" can be

Re: [Python-3000] PEP 3102 comments

2006-05-24 Thread Benji York
Antoine Pitrou wrote: > Why not: > def f(a, b, !c, !d): > > The exclamation mark can be thought to say "you must explicitly mention > this one by its name". > I think having a sigil in front of a variable name is less ugly than > having a separate sigil between commas as a fake parameter. In th

Re: [Python-3000] PEP 3102 comments

2006-05-24 Thread Benji York
next best thing I can come up with is: def f(a, b, =, c, d): The "=" vaguely references the "=" in keyword arguments. -- Benji York ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-

Re: [Python-3000] Is reload() feasible?

2006-04-14 Thread Benji York
approach and defining a very narrow set of requirements to make a module reloadable. Perhaps something along those lines would be useful for Py3K. -- Benji York ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/list

Re: [Python-3000] Adaptation [was:Re: Iterators for dict keys, values, and items == annoying :)]

2006-04-01 Thread Benji York
IMpz) @interface.implementer(IIndex) def index(mpz): return long(mpz) The zope.component README goes into more detail (especially the "Adapters" section): http://svn.zope.org/*checkout*/Zope3/trunk/src/zope/component/README.txt?rev=39671 -- Benji York ___

Re: [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-04-01 Thread Benji York
Greg Ewing wrote: > Benji York wrote: >>If I, as the user of the interface, have something I want to >>pass in that doesn't match I it to the appropriate interface the burden >>is on me to create something that matches expectations. People do that >>all the

Re: [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-04-01 Thread Benji York
e it creates benefits. > So I have to think > ahead and try to anticipate what adaptations > other people might want my code to make. Just as you have to think ahead and anticipate what functionality other people might want. Adaptation isn't magic; it's still part of iter

Re: [Python-3000] Iterating over a dict

2006-04-01 Thread Benji York
ice for "bare" dict iteration. -- Benji York ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Re: [Python-3000] Adaptation [was:Re: Iterators for dict keys, values, and items == annoying :)]

2006-04-01 Thread Benji York
) method to mpz objects and flagged them as providing IIndex, my adapter wouldn't be necessary any more (because adapting something to an interface that it already provides returns the original object). Alternately they could provide their own adapter, and I could stop using mine. -- Benji

Re: [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-03-31 Thread Benji York
intend to bore people with a study of adaptation in Zope 3, but instead am attempting to echo Alex's realization that once you have the simple tools of adaptation in mind (much like other practices like OO or data-driven programming) you start to recognize places where they help you solve probl

Re: [Python-3000] Iterators for dict keys, values, and items == annoying :)

2006-03-27 Thread Benji York
Adam DePrince wrote: > Question #2: > > What should delete() return? I currently have it returning the iter > itself to make it possible to say: > > value = iter.delete().next() Python doesn't generally return self for call-chaining purposes. I'd say delete()