Suren a écrit :
> > Python with ? CGI ? FastCGI ? mod_python ? Other ?
>
> We are using mod_python and SSI.
>
> We are inheriting some legacy code
> that we do not want to mess with at all.
Ok.
> > You shouldn't - unless this is an internal web-based application, not a
> > public site. Since yo
Fulvio a écrit :
> ***
> Your mail has been scanned by InterScan MSS.
> ***
>
>
> On Saturday 21 October 2006 02:01, James Stroud wrote:
> > I think the trick is to identify when a class would make more sense than
> > a collection of subroutines
>
> I do be
[EMAIL PROTECTED] a écrit :
> I am new to Python but come from a C++ background so I am trying to
> connect the dots :) . I am really liking what I see so far but have
> some nubee questions on what is considered good form. For one thing I
> am used to class variables
I assume you mean "instance
Theerasak Photha a écrit :
> On 10/11/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
> > Now the real question : what if the object is not an instance of any of
> > the types, but still support the expected interface ?
>
> Perhaps:
>
> try:
> for attribute in ['foo', 'bar', '__baz__']:
>
[EMAIL PROTECTED] a écrit :
> I just started to learn python programming because I need to be in the
> group when google come in Madagascar, So I want to know, what kind of
> python programming I have to start to learn? Zope?...?
Not sure what you mean about Google and "being in the group", but
sam a écrit :
(snip)
> i'm still in the early stages, and am trying to code something simple
> and interactive to get the percentages of the portfolio in the five
> different investment categories. i thought i'd get in with the error
> handling early so if someone types in something wrong (like a
(answering to the op)
Cloudthunder wrote:
> How can I set up method delegation so that I can do the following:
> A.run()
> and have this call refer to the run() method within the boo instance? Also,
> what if I have tons of functions like run() within the boo instance and I
> want all them to be
> Are you sure you don't want to use a child class for this?
Composition/delegation introduce far less coupling than implementation
inheritance. Inheritance abuse is in fact a well-known OO antipattern.
Since Python makes delegation easy as pie, I don't see any reason to go
for inheritence when it
> Hm, as far as I know shadowing the builtins is discouraged.
*accidentally* shadowing builtins is a common Python gotcha - that's
why it's comon here to raise *warnings* about this.
Explicitly and knowingly rebinding a builtin (or any other name FWIW)
*with a compatible object* is something else
> Someone has give my 78 year old mother a tool for learning French
> vocabulary written in Python.
Is it the tool or the vocabulary that's written in Python ?
> She has a plain vanilla Windows XP system and does not know what a
> compiler is.
One doesn't need to know what's a compiler is to us
class Parrot(object):
class _dummy(object):
def __init__(self, obj, name):
self.name = name
self.obj = obj
def __call__(self, *args, **kw):
print "dummy %s for %s" % (self.name, self.obj)
print "called with %s - %s" % (str(args),
1. read this:
www.catb.org/~esr/faqs/smart-questions.html
2. do the Python tutorial
3. do your homework
4. when stuck, post your code here
HTH
--
http://mail.python.org/mailman/listinfo/python-list
> It turns out that what I want to do can be done using the inspect
> module which has methods for getsourcecode among other things.
I never said that what you wanted to do was impossible (nor even
difficult, and FWIW, there are simpler alternatives than using inspect
- using a templating system l
13 matches
Mail list logo