Hi
> > hofer a écrit :
> >> I have multiple objects all belonging to the same class
> >> (which I didn't implement and whose code I don't want to modify)
>
> >> Now I'd like to change one method for one object only (after it has
> >> b
On Oct 14, 7:50 pm, hofer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have multiple objects all belonging to the same class
> (which I didn't implement and whose code I don't want to modify)
>
> Now I'd like to change one method for one object only (after it
Hi,
I have multiple objects all belonging to the same class
(which I didn't implement and whose code I don't want to modify)
Now I'd like to change one method for one object only (after it has
been created) without adding any overhead
to the call of the other object's methods.
Is this possible
On Sep 26, 6:21 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> hofer wrote:
> > Hi,
>
> > I get following warning with a python script:
>
> > optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will
> > return a signed string in Python 2.4 and up
>
&
Hi,
I get following warning with a python script:
optparse.py:668: FutureWarning: %u/%o/%x/%X of negative int will
return a signed string in Python 2.4 and up
my code:
from optparse import OptionParser
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('-G','--green'
On Sep 11, 10:36 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>I'd type the explicit
>
> v1,v2,v3 = mydict['one'], mydict['two'], mydict['two'] # 54 chars > Either
> is only a couple more
> characters to type. It is completely
> explicit and comprehensible to everyone, in comparison to
>
>
country = itemgetter('name age country'.split())(x) # or any
of my above versions
# a lot of code using name / age / country
thanks a gain and bye
H
On Sep 10, 5:28 pm, hofer <[EMAIL PROTECTED]> wrote:
> Let's take following perl code snippet:
>
> %myhash=( one =
Hi,
Let's take following perl code snippet:
%myhash=( one => 1, two => 2, three => 3 );
($v1,$v2,$v3) = @myhash{qw(one two two)}; # <-- line of interest
print "$v1\n$v2\n$v2\n";
How do I translate the second line in a similiar compact way to
python?
Below is what I tried. I'm just in
Hi,
Something I have to do very often is filtering / transforming line
based file contents and storing the result in an array or a
dictionary.
Very often the functionallity exists already in form of a shell script
with sed / awk / grep , . . .
and I would like to have the same implementation in m