On Feb 25, 10:11 pm, Zvezdan Petkovic wrote:
> On Feb 25, 2009, at 3:54 PM, Shawn Milochik wrote:
>
> > It is true that it would be fewer lines of code with the same
> > functionality, but it's better practice to have that framework in
> > place so that any changes made in the future wouldn't brea
Thanks for the tips, everybody.
I've cleaned it up, and learned some useful things from your comments
and the reading they led to.
http://shawnmilo.com/ships/
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 26, 3:50 am, Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani wrote:
>
> > Yes it's in Python alright, but it's not Pythonese yet. You could try
> > avoiding the getter/setter stuff, and camelCase method naming, things like
> > that, for a start.
>
> > --
> >http://m
On Feb 25, 2009, at 3:54 PM, Shawn Milochik wrote:
It is true that it would be fewer lines of code with the same
functionality, but it's better practice to have that framework in
place so that any changes made in the future wouldn't break any of the
code accessing my class. Obviously this is a fa
On Wed, 25 Feb 2009 15:54:46 -0500, Shawn Milochik wrote:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an actual reason for that. The
On 2009-02-25, Diez B. Roggisch wrote:
> Don't waste time coding for a future you can't even pretend to
> know. Do what is needed to solve the actual problem.
Premature obfuscation is even worse than premature optimization.
--
Grant Edwards grante Yow! Well, O.K.
Shawn Milochik schrieb:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an actual reason for that. The way you
do it now is simply introdu
On Wed, 2009-02-25 at 15:54 -0500, Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
>
> > Not really. The point about properties is that you *can* make attribute
> > access trigger getter or setter code.
> >
> > But not that you do unless there is an actual reason
Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
>
>> Not really. The point about properties is that you *can* make attribute
>> access trigger getter or setter code.
>>
>> But not that you do unless there is an actual reason for that. The way you
>> do it now is s
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
> Not really. The point about properties is that you *can* make attribute
> access trigger getter or setter code.
>
> But not that you do unless there is an actual reason for that. The way you
> do it now is simply introducing clutter, with
Shawn Milochik schrieb:
Thanks. I wasn't aware of the property() function, but I read up on
it. I modified the Vessels.py file, but not the board file (except
where necessary to handle the changes made to Vessels. Is this better?
http://shawnmilo.com/ships/ships2/
Not really. The point about
Thanks. I wasn't aware of the property() function, but I read up on
it. I modified the Vessels.py file, but not the board file (except
where necessary to handle the changes made to Vessels. Is this better?
http://shawnmilo.com/ships/ships2/
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 25 Feb 2009 14:50:18 -0200, Shawn Milochik
escribió:
On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani
wrote:
Yes it's in Python alright, but it's not Pythonese yet. You could try
avoiding the getter/setter stuff, and camelCase method naming, things
like
that, for a start.
What d
Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani wrote:
>> Yes it's in Python alright, but it's not Pythonese yet. You could try
>> avoiding the getter/setter stuff, and camelCase method naming, things like
>> that, for a start.
>>
>> --
>> http://mail.python.org/mailman/lis
On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani wrote:
>
> Yes it's in Python alright, but it's not Pythonese yet. You could try
> avoiding the getter/setter stuff, and camelCase method naming, things like
> that, for a start.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
What d
Shawn Milochik wrote:
> I'm not claiming it's bulletproof, but it works. I just kind of came
up with all the
methods off of the top of my head, so if anyone has any suggestions
for more elegant or efficient code, please let me know.
Yes it's in Python alright, but it's not Pythonese yet. You
I started learning Java for fun, and the first project assignment in
the book is to create a game like "Battleship." So, of course, I wrote
it in Python first, just for fun. I haven't had the time to look up
all the Java syntax.
So, here it is, fully functional. I thought I'd throw it out there an
17 matches
Mail list logo