[python-win32] advice on architecting or program design in python:
mark.a.brand at gmail.com
Tue Mar 11 14:30:34 CET 2008
Python is that refactoring is usually really easy.
thats a good thing to know.
i was originally going to just start out the naive way and refactor as
python became more familiar. i think that approach may work best for me -
take baby steps and refactor as i my knowledge and experience grows.
On 12/03/2008, Tim Golden <mail at timgolden.me.uk> wrote:
> mark.a.brand wrote:
> > Hi Tim:
> > Thanks, that was what I was after, but maybe you are right a couple of
> > for loops is not looking too bad after all.
> The code looks a little scary at first sight but it's
> not that bad ;)
> It's one of those things everyone learns to weigh up when
> they're putting together code / data. How "clever" do I
> try to be. Sometimes there's clear benefit (or at least
> no clear disadvantage). Other times it's the result of
> overengineering -- and often up front. You may find, for
> example, that the .executemany in the sqlite example gives
> a performance benefit over Elixir's more explicit looping,
> but you might not (or it might not be significant). Go
> with what's clearest first, then look for optimisations where
> you really need them.
> [One of] The great thing[s] about Python is that refactoring
> is usually really easy. The two solutions I outlined did
> (broadly) the same thing. You could make them even more
> similar with a little work. Each one is only a couple of
> dozens of lines of code. If you started with one and decided
> later that the other was preferable, it would be really simple
> to swap one out and the other in. Obviously, it's not always
> that easy but it's certainly easi*er*.
> Good luck with the project. Do come back for more help
> (or hindrance).
> python-win32 mailing list
> python-win32 at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the python-win32