[Python-Dev] RE: PEP-317
Paul Prescod
paul@prescod.net
Mon, 16 Jun 2003 14:29:00 -0700
Steven Taschuk wrote:
> Quoth Aahz:
> [...]
>
>> raise Found()
>>except Found:
>
> [...]
>
>>I find that extra set of parentheses unnecessary and ugly. It implies a
>>callable where it's not really being used that way, [...]
>
>
> In
> raise Found
> Found *is* being used as a callable under the hood; an instance of
> Found is created implicitly. You just happen not to care about
> that instance.
Yes, I think that this is precisely the reason that I don't like
implicit instantiation. The syntax can put the user in the wrong mental
model. An object _is_ being created. Python has an object instantiation
syntax. It is unclear to me what you gain by avoiding the syntax used
for object instantiation everywhere else.
Paul Prescod