://attendee.gotowebinar.com/register/7034105107342895362
we hope to see you there :)
Rafi,
WhiteSource software.
--
https://mail.python.org/mailman/listinfo/python-list
;
math.ceil returns what you need but as a float, then create an int
>>> import math
>>> math.ceil (12.3)
13.0
>>> int (math.ceil (12.3))
13
hth
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
Ron Garret wrote:
>>Because eval() takes an expression as an argument, and assignment is a
>>statement.
>
> And if you find this distinction annoying, try Lisp.
that's were I come from :-)
--
rafi
"Imagination is m
> If you turn this into a module file and run this
> it print out
> 3 2 1 0 none
I suppose you wrote this down (instead of cut and paste) as the none is
not capitalized. There must be something else in your module that writes
the none as your code presented above should really not "a
Steve Holden wrote:
> Because eval() takes an expression as an argument, and assignment is a
> statement.
I am definitely not a language lawyer... but I should a little bit more
thanks,
--
rafi
"Imagination is more important tha
istake ;)
>
> It actually is
>
> exec 'a%s=%s' % (count, value)
Noted.
In the meantime another question I cannot find an answer to: any idea
why does eval() consider '=' as a syntax error?
>>> eval ('a=1')
Traceback (most recent call last):
F
or at the beginning of a chunk
may not be the same for processing? All the instructions of the program
would then be in the cpu cache for example in the same block while in
the other case theyr would be in two distinct block -> thus less caching
for the cpu... [this particular problem arose when I was working several
year ago on a persistent object manager for a distributed operating system]
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
Adriaan Renting wrote:
> You might be able to do something along the lines of
>
> for count in range(0,maxcount):
> value = values[count]
> exec(eval("'a%s=%s' % (count, value)"))
why using the eval?
exec ('a%s=%s' % (count, value))
should be
'.txt')
or if you are really reluctant:
>>> 'c:\\foo\\bar'.split ('\\')
['c:', 'foo', 'bar']
>>> 'c:\\foo\\bar'.split ('\\') [-1]
'bar'
> Fredrik Lundh wrote:
>> instead of
unction, it uses the
same list that has been filled before... you do not have the problem
with say and int or a string as they are non mutable objects. however
lists are mutable objects so... modify your function as follow:
def myFunction(l1,l2,result=None):
if result is None:
nd managing folders.
>
> I also look for some existing mail client, written in python
> which wud serve my cause.
>
> i searched google for no avail.
>
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
my program by reading only the last 20
> lines. How do I do this?
>
> Thomas Philips
>
If you are using a Unix:
tail -20 file.txt
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
lly when several persons replied to you...
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
when no data is available? If no data is
available then nothing is returned, the function hangs. (Which is the
cas for receive)
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
fast to
give a false answer, it is like driving a truck with the eyes closed in
down town ("I can go fast, I am not scared, I do not see the dangers").
Please tell us for you are working in order for us to avoid the software
/ services you are providing.
--
rafi
"Imag
#x27;s computer programs where running two times slower
but with two times less bugs, imagine how many hours we would benefit...
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
join (values)))
output.close ()
you can define two function, in case of your output may vary in the future.
> [snip your code]
8 levels of indentation seems really to much for a good ppiece of code
from my point of view.
my 2 cents
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
"%s.%s" % (row, column)
should answer your problem easily
my 2 cents
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
provides an overall structure with particular rules
for its use, while the library provide basic blocks that you may
assemble in your own way (even if some constaints exist).
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
n MacOSX, apart from calling "mount" as
> an external program and parsing the output - but I prefer "cleaner"
> solutions. Is there one?
why not looking at the content of the /Volumes folder?
my 2 cents
--
rafi
"Imagination is more important than knowledge
rafi wrote:
> In order to unit test a function / method one should use mock objects,
> otherwise you may not be sure that your code is faulty.
'should' may be too strong, 'may' may be better. In the meantime I found:
http://python-mock.sourceforge.
at long to run (well from my point of
view, which is again not the one of an expert of unit testing).
I do agree with Benjamin Niermann when he says: "Or because it is
already close to perfection (at least in what it is intended to do)."
unittest is for unittesting :-)
my 2 cents
--
ra
wing code or line 3 of the use of the code?
on my box it runs, except that ValueError is not caught by the except.
side question: what is the point of accepting invalid dates?
--
rafi
"Imagination is more important than knowledge."
plement some
CORBA stuff using Java (moreover compared to C++) because of the lack of
multiple inheritance.
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
Michele Simionato wrote:
>>I am mostly
>>using old style (without type unification) init but this motivate the
>>shift for the new style. Is there somewhere a document about this?
>
> Yes, see http://www.python.org/2.3/mro.html by yours truly
>
>Michele Sim
er goes through all the super classes init to
find the attributes that may have name conflict and keep the value of
the attribute baesd upon the order of the class declaration in the
definition of C (here the value of foo in A). Am I right? I am mostly
using old style (without type unification)
se, so it takes the first
one in the list of inherited classes (order of the declaration). However
I cannot find an explanation (I may have googled the wrong keywords) for
the order of the __init__ calls from C. I was expecting (following the
same order as the method
e as the one used to isntall py2app?
Have you tried to re-install the py2app (even version 0.17)?
my 2 cents
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
;ve accessed on slicing) didn't answer
> my question.
If, after looking for information on your own you did not find a
solution, it may mean that you are ready to post a question :-)
my 2 cents
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
--
http://mail.python.org/mailman/listinfo/python-list
29 matches
Mail list logo