Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29927 > unrolled thread

metaclass question

Started byChris Withers <chris@simplistix.co.uk>
First post2012-09-24 18:43 +0100
Last post2012-09-24 18:43 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  metaclass question Chris Withers <chris@simplistix.co.uk> - 2012-09-24 18:43 +0100

#29927 — metaclass question

FromChris Withers <chris@simplistix.co.uk>
Date2012-09-24 18:43 +0100
Subjectmetaclass question
Message-ID<mailman.1209.1348519361.27098.python-list@python.org>
Hi All,

Is there a metaclass-y way I could cause the following:

class TheParser(Parser):
     def handle_ARecord(self):
         pass
     def handle_ARecord(self):
         pass

...to raise an exception as a result of the 'handle_ARecord' name being 
reused?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web