On Nov 26, 1:10 am, Steven D'Aprano wrote:
> On Thu, 25 Nov 2010 08:15:21 -0800, Yingjie Lan wrote:
> > Intuition #1: as if you raise an exception type, and then match that
> > type.
> > It seems that no instances
> > are involved here (Intuitively).
>
> Your intuition is not my intuition, nor doe
--- On Fri, 11/26/10, Steven D'Aprano
wrote:
> From: Steven D'Aprano
> Subject: Re: what a cheap rule
> To: python-list@python.org
> Date: Friday, November 26, 2010, 5:10 AM
> On Thu, 25 Nov 2010 08:15:21 -0800,
> Yingjie Lan wrote:
>
> You seem to have mis
On Thu, 25 Nov 2010 08:15:21 -0800, Yingjie Lan wrote:
> Intuition #1: as if you raise an exception type, and then match that
> type.
> It seems that no instances
> are involved here (Intuitively).
Your intuition is not my intuition, nor does it match what Python
actually does. You can only go s
On 11/25/2010 4:12 AM, Yingjie Lan wrote:
Sometimes the golden rule in Python of
"explicit is better than implicit" is
so cheap that it can be thrown away
for the trouble of typing an empty tuple.
Today when I am explaining that in Python 3,
there are two ways to raise exceptions:
raise Excepti
On 11/25/2010 10:15 AM, Yingjie Lan wrote:
> As I am thinking about it, it seems two
> conflicting intuition of code comprehension
> are at work here:
>
> Intuition #1: as if you raise an exception
> type, and then match that type.
> It seems that no instances
> are involved here (Intuitively).
>
--- On Thu, 11/25/10, Steve Holden wrote:
> > Sometimes the golden rule in Python of
> > "explicit is better than implicit" is
> > so cheap that it can be thrown away
> > for the trouble of typing an empty tuple.
> >
> I'm not sure that there *are* any golden rules. The "Zen of
> Python" is
> inte
On 11/25/2010 3:12 AM, Yingjie Lan wrote:
> Sometimes the golden rule in Python of
> "explicit is better than implicit" is
> so cheap that it can be thrown away
> for the trouble of typing an empty tuple.
>
I'm not sure that there *are* any golden rules. The "Zen of Python" is
intended to be guide