Michele Simionato <[EMAIL PROTECTED]> writes:
> I am not against mixins (even if I am certainly very much against the
> *abuse* of mixins, such as in Zope 2). What I would advocate (but I
> realize that it will never happen in Python) is single inheritance +
> mixins a la Ruby.
Ruby might be a ba
luca bertini <[EMAIL PROTECTED]> writes:
> i have strings which look like money values (ie 34.45)
> is there a way to convert them into float variables?
> everytime i try I get this error: "numb = float(my_line) ValueError:
> empty string for float()"
> "
You actually have problems here -- the
[EMAIL PROTECTED] writes:
> What's with the index() function of lists throwing an exception on not
> found? Let's hope this is rectified in Python 3. If nothing else, add
> a function that doesn't throw an exception. There are a million
> situations where you can have an item not be in a list and
Moon <[EMAIL PROTECTED]> writes:
> class Vec(list):
> def __init__(self):
> list.__init__(self, [0.0, 0.0])
>
> def __iadd__(self, other):
> assert isinstance(other, Vec)
> self[0] += other[0]
> self[1] += other[1]
> print "right now, v is: ", self,
Marco Nawijn <[EMAIL PROTECTED]> writes:
> The problem I face is that the implementation of the application class
> is completely different for the local and remote case. The local case
> is a straightforward implemenation using the subprocess module, the
> remote case is a CORBA implementation. S
Nils Oliver Kröger <[EMAIL PROTECTED]> writes:
> If you want to "reuse" the file, you will have to delete your classes
> instance explicitly using the del statement ... this will also call
> the destructor.
Sometimes, but not always. The `del' statement simple removes the
reference to the instan
Kless <[EMAIL PROTECTED]> writes:
> For who knows any of criptography I comment that you can use
> algorithms as secure as Rijndael, Twofish, or Serpent with the CFB
> cipher mode. And for hash you can use RIPEMD, SHA-2 or WHIRLPOOL.
PyCrypto does includes the AES version of Rijndael as Crypto.Ci
Bjoern Schliessmann <[EMAIL PROTECTED]> writes:
> The solution I'd use is a decorator that calls next automatically one
> time after instantiation. Then you can use send normally, and don't
> have to care about any initial parameters, which makes the code
> clearer (initial parameters should be us
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> Do you really need a generator or co-routine to do this? Maybe
> you can just use a closure:
For my trivial example, sure -- there are lots of ways to do it. Here's
a slightly better example: the `read' method of a file-like object which
sequent
Bjoern Schliessmann <[EMAIL PROTECTED]> writes:
>> I'm trying to write a decorator which allows one to produce simple
>> coroutines by just writing a function as a generator expression
>> which re-receives it's arguments as a tuple from each yield.
>
> May I ask why? Passing it the same argument
Hi,
I'm trying to write a decorator which allows one to produce simple
coroutines by just writing a function as a generator expression which
re-receives it's arguments as a tuple from each yield. For example:
@coroutine
def nextn(n=1):
values = []
for i in itertools.count
per9000 <[EMAIL PROTECTED]> writes:
> I am trying to figure out the best way to encrypt files in python.
Looking at your code and questions, you probably want to pick up a
cryptography handbook of some sort (I'd recommend /Practical
Cryptography/) and give it a read.
> But I have some thoughts a
12 matches
Mail list logo