[Python-Dev] textwrap wordsep_re

2005-02-21 Thread Karl Chen
Hi, textwrap.fill() is awesome. Except when the string to wrap contains dates -- which I would like not to be broken. In general I think wordsep_re can be smarter about what it decides are hyphenated words. For example, this code: print textwrap.fill('aa 2005-02-21', 18) produces:

Re: [Python-Dev] UserString

2005-02-21 Thread Barry Warsaw
On Mon, 2005-02-21 at 11:15, Guido van Rossum wrote: > Right. There are plenty of examples where LBYL is better, e.g. because > there are too many different exceptions to catch, or they occur in too > many places. One of my favorites is creating a directory if it doesn't > already exist; I always

RE: [Python-Dev] Store x Load x --> DupStore

2005-02-21 Thread Raymond Hettinger
> Where are the attempts to speed up function/method calls? That's an > area where we could *really* use a breakthrough... At one time you had entertained treating some of the builtin calls as fixed. Is that something you want to go forward with? It would entail a "from __future__" and transitio

Re: [Python-Dev] UserString

2005-02-21 Thread Guido van Rossum
> > Anyway, can you explain why LBYL is bad? > > In the general case, it's bad because of a combination of issues. It > may violate "once, and only once!" -- the operations one needs to check > may basicaly duplicate the operations one then wants to perform. Apart > from wasted effort, it may ha

[Python-Dev] Re: Welcome to the "Python-Dev" mailing list

2005-02-21 Thread z-axis
  hi,friends i am a python newbie but i used Java for about 5 years. when i saw python introduce in a famous magzine called <> in China, i am immediately absorbed by its pretty code.

Re: [Python-Dev] Store x Load x --> DupStore

2005-02-21 Thread Michael Hudson
Michael Hudson <[EMAIL PROTECTED]> writes: >> Because there are CO_MAXBLOCKS * 12 bytes in there for the block >> stack. If there was no need for that, frames could perhaps be >> allocated via pymalloc. They only have around 100 bytes or so in >> them, apart from the blockstack and locals/value