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.
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
*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
SNIP
public FooClass(String requiredArgument1, Long requiredArgument2, map
yourOptionalArgumentMap) {
...
}
--
http://mail.python.org/mailman/listinfo/python-list
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,
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
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.
, 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
You can probably do that with varargs.
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
11 matches
Mail list logo