[Python-Dev] Re: PEP 246: LiskovViolation as a name (original) (raw)
Steven Bethard steven.bethard at gmail.com
Thu Jan 13 01:54:41 CET 2005
- Previous message: [Python-Dev] Re: PEP 246: LiskovViolation as a name
- Next message: [Python-Dev] Re: PEP 246: LiskovViolation as a name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 12 Jan 2005 19:49:06 -0500, Phillip J. Eby <pje at telecommunity.com> wrote:
So the only way you can see this error is if you call conform directly, and somebody added code like this:
raise LiskovViolation So, it's not something you need to worry about a newbie seeing. The real problem with the name is knowing that you need to use it in the first place! IMO, it's simpler to handle this use case by letting conform return None, since this allows people to follow the One Obvious Way to not conform to a particular protocol.
Not that my opinion counts for much =), but returning None does seem much simpler to me. I also haven't seen any arguments against this route of handling protocol nonconformance... Is there a particular advantage to the exception-raising scheme?
Steve
You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
- Previous message: [Python-Dev] Re: PEP 246: LiskovViolation as a name
- Next message: [Python-Dev] Re: PEP 246: LiskovViolation as a name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]