Message259839
When creating an abstract class, subclassing tuple causes check for instantiation of an abstract class to be bypassed. See the associated stackoverflow question -- http://stackoverflow.com/questions/35267954/mix-in-of-abstract-class-and-namedtuple
from abc import abstractmethod, ABCMeta
class AbstactClass(tuple, metaclass=ABCMeta):
@abstractmethod
def some_method(self):
pass
# following should throw a TypeError, but doesn't
AbstactClass() |
|
Date |
User |
Action |
Args |
2016-02-08 12:21:53 | Jack Hargreaves | set | recipients:
+ Jack Hargreaves |
2016-02-08 12:21:53 | Jack Hargreaves | set | messageid: <1454934113.76.0.551150355835.issue26306@psf.upfronthosting.co.za> |
2016-02-08 12:21:53 | Jack Hargreaves | link | issue26306 messages |
2016-02-08 12:21:53 | Jack Hargreaves | create | |
|