Re: [Pydev-code] Getting started with PyDev scripting
Brought to you by:
fabioz
|
From: Joel H. <yo...@if...> - 2006-04-13 07:20:39
|
Hi!
> I tried a one-liner:
>
> def fun(fred): foo = fred
>
> and still get the same result.
Oh. Guess that was a bit ambiguous. By "method def one-liner" I mean a
method def statement where the def keyword, parameters, and scope
opening colon all live on the same line. I.e: no line continuations
either using brackets or backslashes.
Good:
def moo(self, cow):
(code here)
Bad:
def \
moo(self,
cow): (code here)
and I guess assuming no code after scope opening colon isn't such a
great idea either. But anyway all this will be corrected once I learn
how to script pydev properly.
> Adding #@UnresolvedImport to the ends of a couple of from lines
> fixes PySelection and PyAction.
Oh. I didn't understand what it was at first (running plain pydev) but
I'll fix it.
> I don't think that True/False appeared in Python until 2.3 or 2.4 and
> Jython is 2.1.
Jython 2.2alpha1 is out if you're interested. Downloaded it yesterday.
Thanks for the tips!
/Joel
|