Help with Python Grammar change
Travis Oliphant
olipt at mayo.edu
Mon Feb 14 18:23:28 EST 2000
I have a question for people familiar with the Python Grammar:
How difficult would it be and what are the problems with altering the
grammar (and compile.c code) so that one can enter slice-syntax as an
argument to a function call:
In other words if g is a function:
def g(a,b):
# some nifty code
return
I want
>>> g(1:10:2,3)
to call function g with slice(1,10,2) and 3 as arguments.
Is this at all possible, or would it break things horribly?
Thanks for any feedback,
Travis Oliphant
More information about the Python-list
mailing list