Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-15 Thread Dirk Olmes
On Fri, 12 Aug 2011 17:02:38 +, kj wrote: *Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum is more likely than a Java one to have among its readers those who have had to deal with the same problems I'm wrestling with.

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-13 Thread rav
On Aug 12, 1:35 pm, MRAB pyt...@mrabarnett.plus.com wrote: On 12/08/2011 18:02, kj wrote: *Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum is more likely than a Java one to have among its readers those who have

Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread kj
*Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum is more likely than a Java one to have among its readers those who have had to deal with the same problems I'm wrestling with. Due to my job, I have to port some Python code

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Nathan Rice
SNIP public FooClass(String requiredArgument1, Long requiredArgument2, map yourOptionalArgumentMap) { ... } -- http://mail.python.org/mailman/listinfo/python-list

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread MRAB
On 12/08/2011 18:02, kj wrote: *Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum is more likely than a Java one to have among its readers those who have had to deal with the same problems I'm wrestling with. Due to my job,

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Billy Earney
Look into jython. You might be able to run your python code, directly in java. :) http://www.jython.org/ On Fri, Aug 12, 2011 at 12:02 PM, kj no.em...@please.post wrote: *Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Alain Ketterlin
kj no.em...@please.post writes: [...] def quant(xs, nlevels=MAXN, xlim=MAXX): [...] My Java implementation of it already requires at least 8 method definitions, with signatures: (BTW, your approach won't work if several optionals have the same type.) [...] - use Integer, Float, etc.

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Jeffrey Gaynor
, 2011 12:02:38 PM Subject: Java is killing me! (AKA: Java for Pythonheads?) *Please* forgive me for asking a Java question in a Python forum. My only excuse for this no-no is that a Python forum is more likely than a Java one to have among its readers those who have had to deal with the same

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Miki Tebeka
You can probably do that with varargs. -- http://mail.python.org/mailman/listinfo/python-list

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Chris Angelico
On Fri, Aug 12, 2011 at 6:02 PM, kj no.em...@please.post wrote: I ask myself, how does the journeyman Python programmer cope with such nonsense? Firstly, figure out how many combinations of optional arguments actually make sense. Any that don't, don't support. That may well cut it down

Re: Java is killing me! (AKA: Java for Pythonheads?)

2011-08-12 Thread Dan Stromberg
Check varargs (as another poster mentioned), and consider doing your unit tests in Jython. Some shops that don't want Python for production code are fine with Python for unit tests. However, if the reason for preferring java is type checking, you could perhaps get somewhere by suggesting pylint.