On Sat, 11 Jun 2005 19:42:27 -0400, Simon Gerber wrote
(in article <[EMAIL PROTECTED]>):
> Hullo,
>
> Firstly, thanks to everyone who helped me find my own IP address. That
> was a big help. That bit is working now, and working very nicely. I am
> now stuck on something purely aesthetic - print
Using code objects?
===
As an OO exercise I have a factory pattern that returns class objects that
each have an "action" method. ClassObj.action() in turn returns a code
object in my recursive process loop.
I create the code objects as a one time step outside my factory pattern
On Tue, 21 Jun 2005 16:52:09 -0400, Chuck Allison wrote
(in article <[EMAIL PROTECTED]>):
> Sorry for the elementary question: I was wondering if someone could
> explain the difference to me between class and static methods. Coming
> from other languages, I'm used to static methods, but not "class
On Tue, 21 Jun 2005 17:58:09 -0400, Chuck Allison wrote
(in article <[EMAIL PROTECTED]>):
> Hello Chinook,
>
> So is the main motivation for class methods so that you can have the
> class object available? It seems you can have that anyway in a static
> method by just askin
OO refactoring trial
Following is a simple trial structure of a refactoring (top-down to OO)
learning exercise I'm doing. Whether you call it a Factory pattern, COR
pattern, or some hinze 57, I don't know what class to use till run time and
I'm trying to avoid a lengthy "if
[[ This message was both posted and mailed: see
the 'To' and 'Newsgroups' headers for details. ]]
Clarifications:
1) Truth test simplified after a %) by Peter Otten - thanks. In reality the
"testit" methods will all be quite different as you might imagine (as will
the "doit" methods).
2) A
Clarifications:
1) Truth test simplified after a %) by Peter Otten - thanks. In reality the
"testit" methods will all be quite different as you might imagine (as will
the "doit" methods).
2) A final subclass will always return True, so there will always be a valid
result.
On Tue, 28 Jun 2005 07:31:43 -0400, Chinook wrote
(in article <[EMAIL PROTECTED]>):
> [[ This message was both posted and mailed: see
>the 'To' and 'Newsgroups' headers for details. ]]
>
Sorry for the duplication. I'm trying Hogwasher on OS X and
I'm missing something simple again. The simplified issue is:
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
>>> mystr = 'abc'
# I can create a list of the string characters
# with list comprehension
>>> [c for c in mystr]
['a', 'b', 'c']
# Or just a simple builtin conversion function
>>> l
Just the thing Light and Chuck - I thought there might be something
simple (and I've used the join method before duh).
Thanks,
Lee C
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Liam,
I couldn't get "into" your approach at the moment, but I was wondering
if you have looked at the following:
First, the Reverse Puzzle section of:
http://cs.gettysburg.edu/~tneller/resources/ai-search/uninformed-java/
and secondly more generally:
http://www.gamedev.net/reference/articles/a
Kevin Reeder wrote:
>What's the significance of naming a variable with a single
>underscore as its first character? For example, I'm looking at
>find.py in the standard library and it has variables named _debug
>and _prune.
>
>Kevin
>___
>Tutor maillist
12 matches
Mail list logo