Magnus Lycka wrote:
> John Salerno wrote:
>> Thanks guys! I had a feeling exceptions were nothing like in C
>> languages (i.e. a pain to deal with). :)
>
> Since when does C have exceptions? (You're not confusing C with C++
> or C#?)
I meant C-based languages, like C#.
--
http://mail.python.or
John Salerno wrote:
> One of the things I learned with C# is that it's always better to handle
> any errors that might occur within the codes itself (i.e. using if
> statements, etc. to catch potential out of range indexing) rather than
> use too many try/catch statements, because there is some
John Salerno wrote:
> Thanks guys! I had a feeling exceptions were nothing like in C languages
> (i.e. a pain to deal with). :)
Since when does C have exceptions? (You're not confusing C with C++
or C#?)
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> In general, it's more frequent for EAFP to be handier and more solid,
> and performance may well not matter -- but if you find yourself trying
> to squeeze every last drop of performance from a region of your code
> that profiling has shown to be a bottleneck, module timeit
Delaney, Timothy (Tim) wrote:
[...]
>
> Generally, you should always go for whatever is clearest/most easily
> read (not just in Python, but in all languages).
+1 QOTW
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd www.holdenweb.com
Lo
John Salerno <[EMAIL PROTECTED]> wrote:
> John Salerno wrote:
> > One of the things I learned with C# is that it's always better to handle
> > any errors that might occur within the codes itself (i.e. using if
> > statements, etc. to catch potential out of range indexing) rather than
> > use too
John Salerno wrote:
> One of the things I learned with C# is that it's always better to handle
> any errors that might occur within the codes itself (i.e. using if
> statements, etc. to catch potential out of range indexing) rather than
> use too many try/catch statements, because there is some
Steven D'Aprano wrote:
> The classic example of the "look before you leap" and
> "just do it" idioms involves looking up a key in a
> dictionary:
>
> # method one
> if some_dict.has_key(key):
> do_something_with(some_dict[key])
> else:
> do_something_else()
FWIW, in recent Python versi
John Salerno wrote:
> One of the things I learned with C# is that it's always better to handle
> any errors that might occur within the codes itself (i.e. using if
> statements, etc. to catch potential out of range indexing) rather than
> use too many try/catch statements, because there is some
In article <[EMAIL PROTECTED]>,
John Salerno <[EMAIL PROTECTED]> wrote:
> One of the things I learned with C# is that it's always better to handle
> any errors that might occur within the codes itself (i.e. using if
> statements, etc. to catch potential out of range indexing) rather than
> use
John Salerno wrote:
> One of the things I learned with C# is that it's always better to handle
> any errors that might occur within the codes itself (i.e. using if
> statements, etc. to catch potential out of range indexing) rather than
> use too many try/catch statements, because there is some
One of the things I learned with C# is that it's always better to handle
any errors that might occur within the codes itself (i.e. using if
statements, etc. to catch potential out of range indexing) rather than
use too many try/catch statements, because there is some overhead every
time the pro
12 matches
Mail list logo