Re: Writing "pythonish" code

2007-02-02 Thread bearophileHUGS
Mizipzor: > To me, the main.py code above looks very ugly. With time, and looking at other people code, you will learn what pythonic means, in the meantime you can remember that into your Python code if you find something that makes you write too much code, or you see something "ugly", then that's

Re: Writing "pythonish" code

2007-02-02 Thread Neil Cerutti
On 2007-02-02, Toby A Inkster <[EMAIL PROTECTED]> wrote: > Mizipzor wrote: >> One thing is that in c++ im used to have private members in >> classes and no member is altered except through the public >> functions of the class. > > By convention, class members starting with a single underscore > are

Re: Writing "pythonish" code

2007-02-02 Thread Istvan Albert
On Feb 2, 6:20 am, Mizipzor <[EMAIL PROTECTED]> wrote: > Now, the thing that bothers me the most. When I write python modules I > write one class per file, and the file and the class has a common > name. Maybe this is due to c++ habits. Python modules typically contain multiple classes and modul

Re: Writing "pythonish" code

2007-02-02 Thread Toby A Inkster
Mizipzor wrote: > One thing is that in c++ im used to have private members in classes and > no member is altered except through the public functions of the class. By convention, class members starting with a single underscore are considered private. This is much the same as the convention that

Re: Writing "pythonish" code

2007-02-02 Thread James Stroud
/design, > the concept of writing "pythonish code" if you like. One thing is that > in c++ im used to have private members in classes and no member is > altered except through the public functions of the class. In python > everything is, as far as I know, public. Im confused by this, s

Re: Writing "pythonish" code

2007-02-02 Thread Ben Finney
Mizipzor <[EMAIL PROTECTED]> writes: > The problem isnt in pythons syntax, its in the architecture/design, > the concept of writing "pythonish code" if you like. The nomenclature around here for that concept is "Pythonic". > One thing is that in c++ im used

Re: Writing "pythonish" code

2007-02-02 Thread skyofdreams
m isnt in pythons syntax, its in the architecture/design, > the concept of writing "pythonish code" if you like. One thing is that > in c++ im used to have private members in classes and no member is > altered except through the public functions of the class. In python > everyth

Writing "pythonish" code

2007-02-02 Thread Mizipzor
want learn python even better, since I know that a company I aim to be employed by make heavy use of python, knowing python myself would give me an extra edge. The problem isnt in pythons syntax, its in the architecture/design, the concept of writing "pythonish code" if you like. One thi