python-dev summary, 2001-03-19 - 2001-04-12

Ben Wolfson wolfson at uchicago.edu
Sat Apr 14 03:37:13 EDT 2001


In article <mailman.987072318.21456.python-list at python.org>, "Michael
Hudson" <mwh21 at cam.ac.uk> wrote:

>     * Inverse string interpolation *
> 
>  Peter Funk posted a proposal for using the "/" operator on strings as a
>  kind of dual to "%", i.e. be to "%" what "scanf" is to "printf" in C:
> 
>   <http://mail.python.org/pipermail/python-dev/2001-April/014027.html>
> 
>  There was muted approval for the idea, but less so for the spelling. Of
>  course "scanf" isn't much better unless you've programmed in C... It's
>  possible that this functionality will be somewhere in Python 2.2
>  (though builtin, module, infix operator or string method is still to be
>  decided, and it might be conditional on someone coming up with a good
>  name!).

There's something vaguely resembling an implementation of this in Python
at http://home.uchicago.edu/~wolfson/Python/scanstr.py [+.html]

Also, I discovered that the nested scopes (with and without a
from-__future__ import) dumped core when dealing with the following list
comp:

[[locals.append(here),remotes.append(there) for here,there in\
  [stripped.split('\t') for strippied in\
   [line.strip() for line in open(fn).readlines()]\
   if stripped]\
  if path.exists(here)] for fn in filenames if path.exists(fn)]

-- 
Barnabas T. Rumjuggler
Betty Botter bought an ice-cream sandwich.  "But",
said she, "This ice-cream sandwich's messy!  If I
put it in my pocket, it will make my pocket messy!"



More information about the Python-list mailing list