n error, or a feature? I would say - a feature.
Everyone should be aware, that the argument default values are evaluated
once, and the same value (memory object) is reused at each instance
creation.
Best regards,
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
"error". anyidea where i need to start looking?
It seems to me, like a result of a "print" statement, exexcuted
somewhere (maybe in the except: clause). You may look for lines similar to:
print "error"
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
> Hello,
>
> I'd like to catch all exeptions and be able to inspect them.
>
> The simple case: I know which exceptions I'll get:
>
> # standard textbook example:
> try:
> something()
> except ThisException, e:
> print "some error occurred: ", str(e)
>
>
> The not-so-simple case: Handli
.g. <0, 71>,
representing the 72 characters wide lines being printed.
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
e sure, though, what you
mean by accessing the elements in random order. What's the idea behind
having mylist[1] = [c,f,g], when the elements c, f, and g are apread
across all three internal lists, and at various position within these
lists (not necessarily 1, as the mylist index suggests).
Toma
a string, use
> str(obj). see this tutorial section for more info:
>
> http://docs.python.org/tut/node9.html#SECTION00910
>
>
>
>
>
You are right, Fredrik, but David is using Jython, so perhaps he tried
to mimic the Java language behaviour, where adding in
Dave Hansen wrote:
> I think what you want is
>
>for cr in credlist:
> credits += cr
>
> Which could also be implemented as
>
>credits = reduce(lambda x,y: x+y, credlist)
or even:
credits = sum(credlist)
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
L['a'] first, before referencing L['a']['b']
So, you need to call first:
L['a'] = {}
Then you can write:
L['a']['b'] = 2
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
Sakcee wrote:
> Hi
>
> I want to know that is .pyc files execute faster than .py files,? since
> both are interpreted by python , is there any speedup in using one or
> other.?
>
> e.g.
>
> what is the difference between runing from cmd "python test.py" and
> "python test.pyc"
>
>
> thanks
>
a good method to avoid this kind of problems? How to make such
distributed modules really portable?
Thanks in advance
--
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
ns?
No, it is not a problem with possibly using the comma instead of a dot
in the SOURCE - there only a dot can be used. That's clear.
>
> It's more likely that the .pyc file has been damaged somehow. AFAIK
> they don't have checksums.
Very unlikely. I have made these t
tr(), repr() functions should be
locale-independent. We have the functions in the locale module, if
someone needs the locale-dependent string-float conversions.
--
Tomasz Lisowski
--
http://mail.python.org/mailman/listinfo/python-list
> Unfortunately, I need to open/edit a (temporary) text file with Word, and
> those are opened by default with UltraEdit (or Notepad or..). Thanks for the
> tip, though.
>
> Anything else? Do I need to read the registry?
>
> g
You may try to launch Word as a COM object and control it directly
d
properties. You may also use the object browser.
Tomasz Lisowski
>
> "Tomasz Lisowski" <[EMAIL PROTECTED]> schreef in bericht
> news:[EMAIL PROTECTED]
>
>>You may try to launch Word as a COM object and control it directly from
>>Python using the COM
14 matches
Mail list logo