Add Python < 3.3 support for pyabc.i
pyabc.i for abstract base classes now supports versions of Python prior to 3.3 by using the collection module for these older versions. Python-3.3 and later continue to use the collections.abc module. The -py3 option no longer has any effect on the %pythonabc feature.
This commit is contained in:
parent
9fd2356104
commit
f068f2c2d6
6 changed files with 51 additions and 36 deletions
|
|
@ -4480,10 +4480,9 @@ public:
|
|||
|
||||
/* dealing with abstract base class */
|
||||
String *abcs = Getattr(n, "feature:python:abc");
|
||||
if (py3 && abcs) {
|
||||
if (Len(base_class)) {
|
||||
if (abcs) {
|
||||
if (Len(base_class) > 0)
|
||||
Printv(base_class, ", ", NIL);
|
||||
}
|
||||
Printv(base_class, abcs, NIL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue