On 23 June 2017 at 15:20, Sven R. Kunze wrote:
> On 23.06.2017 03:02, Cameron Simpson wrote:
>
>
> How about something like this?
>
>try:
>val = bah[5]
>except IndexError:
># handle your expected exception here
>else:
>foo(val)
>
>
> That is
+1
I'm quite active in the CoffeeScript community, but am also on a ton of
medication that ultimately means I won't implement much of what I suggest
doing, but the core devs understand the situation well enough to respond
accordingly.
It really does help when people know what they can reasonably
"to put it succinctly" -- IMO we shouldn't discuss features without giving
thought to their implementation.
On Fri, Jun 23, 2017 at 11:28 AM, Brendan Barnwell
wrote:
> On 2017-06-23 09:49, Brett Cannon wrote:
>
>> Everyone, please be upfront when proposing any ideas if
2017-06-23 17:09 GMT+02:00 Andy Dirnberger :
> It's not really a proposal. It's existing syntax.
Wow! I have been using Python since 1.5.2 and I never knew this.
This is not Guido's famous time machine in action, by any chance?
Guess there's some code to refactor using
On Fri, Jun 23, 2017 at 09:29:23AM +1000, Cameron Simpson wrote:
> On 23Jun2017 06:55, Steven D'Aprano wrote:
> >On Thu, Jun 22, 2017 at 10:30:57PM +0200, Sven R. Kunze wrote:
> >>We usually teach our newbies to catch exceptions as narrowly as
> >>possible, i.e.
On 24Jun2017 05:02, Steven D'Aprano wrote:
On Fri, Jun 23, 2017 at 09:29:23AM +1000, Cameron Simpson wrote:
On 23Jun2017 06:55, Steven D'Aprano wrote:
>On Thu, Jun 22, 2017 at 10:30:57PM +0200, Sven R. Kunze wrote:
>>We usually teach our newbies to
On 23Jun2017 15:59, Paul Moore wrote:
On 23 June 2017 at 15:20, Sven R. Kunze wrote:
On 23.06.2017 03:02, Cameron Simpson wrote:
How about something like this?
try:
val = bah[5]
except IndexError:
# handle your expected exception here
On 23Jun2017 20:30, Stephan Houben wrote:
2017-06-23 17:09 GMT+02:00 Andy Dirnberger :
It's not really a proposal. It's existing syntax.
Wow! I have been using Python since 1.5.2 and I never knew this.
This is not Guido's famous time machine in
On 23Jun2017 11:48, Nick Coghlan wrote:
On 23 June 2017 at 09:29, Cameron Simpson wrote:
This is so common that I actually keep around a special hack:
def prop(func):
''' The builtin @property decorator lets internal AttributeErrors
escape.
Cameron Simpson wrote:
try:
foo(bah[5])
except IndexError as e:
... infer that there is no bah[5] ...
One can easily want, instead, some kind of "shallow except", which would
catch exceptions only if they were directly raised from the surface
code;
The problem I see
On Fri, 23 Jun 2017 at 13:10 Paul Moore wrote:
> On 23 June 2017 at 19:28, Brendan Barnwell wrote:
> > So to put it succinctly, as someone who's found discussion on this list
> > interesting and valuable, I think there is value in having discussion
>
11 matches
Mail list logo