Eclipse and the Python plugin

lipska the kat lipskathekat at yahoo.co.uk
Fri Aug 3 13:04:19 EDT 2012


On 03/08/12 17:40, Steven D'Aprano wrote:
> On Fri, 03 Aug 2012 16:51:26 +0100, lipska the kat wrote:
>
>> I can write a
>> Python class and call it Foo and save it in a file called Bar and it's
>> no big deal (at least Eclipse doesn't get excited) If I try that in Java
>> the sky falls in.
>
> :)
>
> Correct. Python does not require, or even encourage, the one-class-per-
> file rule of Java.

snip

Well it's actually one public class per file, you can have as many 
package visible classes as you like not to mention inner classes and 
anonymous classes, but I know what you mean.

I used to know a developer who though that any file (class) that 
contained more lines of code than could fit on an A4 sheet of paper at 
10 points was too large ... a little extreme perhaps.

> Mind you, both of those are seriously large, Decimal has 117 methods and
> Context around 70-80 (I stopped counting). So as I said, that's about the
> upper limit for what I consider reasonable in a single module.

117 methods seems a lot doesn't it. I'm still trying to get my head 
around Python packages, I think Eclipse will help me with this and the 
whole module mix of functions and classes is taking a while to get used 
to. The standard included libraries are pretty impressive though and it 
is certainly easier to write quick throwaway prototypes in Python. I 
guess this will become even quicker once I understand the language better.

lipska

-- 
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun



More information about the Python-list mailing list