On 26/03/06, Kent Johnson [EMAIL PROTECTED] wrote:
Ed Singleton wrote:
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
I want to use this in a
Ed Singleton wrote:
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
I want to use this in a few different places. For example Faces, the
Python
Very rarely, its easy to do backups of huge amounts of data if you
know where to find it, its hard to trawl all over a changing structure
looking for the things that need backing up. Particularly if, when you
try to restore it, it needs to go in a different place to where you
found
On 13/03/06, Alan Gauld [EMAIL PROTECTED] wrote:
For website, I can't really see how I can not have a dynamic
structure. There's no way I'm writing a function for each folder.
Hmm, this may be a CherryPie concept thing but the vast majority
of websites do not have dynamic structures. It
On 10/03/06, Kent Johnson [EMAIL PROTECTED] wrote:
Ed Singleton wrote:
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
I want to use this in a
Ed Singleton wrote:
On 10/03/06, Kent Johnson [EMAIL PROTECTED] wrote:
Ed Singleton wrote:
I want to use this in a few different places. For example Faces, the
Python Project Management Planner Tool Thingy, uses nested functions
to put tasks within a project:
def MyProject():
start =
On 10/03/06, Alan Gauld [EMAIL PROTECTED] wrote:
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
First point, names of functions are no different to
Ed Singleton wrote:
On 10/03/06, Alan Gauld [EMAIL PROTECTED] wrote:
Dynamic site structure shouldn't need dynamic creation of functions
although the structure might need to be dynamically loaded into a
data structure in the code. It might also be a parameter of the functions.
Doesn't
Kent Johnson wrote:
Why not just use nested dicts?
MyProject = dict(
start = 2006-03-06,
resource = Me,
Task1 = dict(start = 2006-03-13),
Task2 = dict(effort = 1w),
)
or nest class instances directly:
MyProject = Project(
start = 2006-03-06,
resource = Me,
Task1
On 13/03/06, Kent Johnson [EMAIL PROTECTED] wrote:
Ed Singleton wrote:
On 10/03/06, Kent Johnson [EMAIL PROTECTED] wrote:
Ed Singleton wrote:
I want to use this in a few different places. For example Faces, the
Python Project Management Planner Tool Thingy, uses nested functions
to put
Ed Singleton wrote:
On 13/03/06, Kent Johnson [EMAIL PROTECTED] wrote:
I've just discovered with a little playing, that you can do:
def z(v):
... def f(x):
... print x * v
... return f
...
c = z(3)
c(1)
3
funcdict = dict(foo = z(4))
funcdict[foo](1)
4
For website, I can't really see how I can not have a dynamic
structure. There's no way I'm writing a function for each folder.
Hmm, this may be a CherryPie concept thing but the vast majority
of websites do not have dynamic structures. It really shouldn't be
necessary. Why would you need to
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
I want to use this in a few different places. For example Faces, the
Python Project Management Planner
Ed Singleton wrote:
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
I want to use this in a few different places. For example Faces, the
Python
How does one go about creating functions, classes, or callable objects
when you don't know their name in advance? (For example you want to
read their names in from a text file or database).
First point, names of functions are no different to names of other things.
def f(x):
y = blah
I want to use this in a few different places. For example Faces, the
Python Project Management Planner Tool Thingy, uses nested functions to
put tasks within a project:
def MyProject():
start = 2006-03-06
resource = Me
def Task1():
start = 2006-03-13
def
16 matches
Mail list logo