Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e81f5ef1
Commit
e81f5ef1
authored
May 27, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove __metaclass__ remains.
parent
76262356
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
13 deletions
+11
-13
Demo/newmetaclasses/Eiffel.py
Demo/newmetaclasses/Eiffel.py
+2
-2
Demo/newmetaclasses/Enum.py
Demo/newmetaclasses/Enum.py
+4
-4
Lib/test/test_descr.py
Lib/test/test_descr.py
+1
-1
Parser/asdl.py
Parser/asdl.py
+0
-2
Tools/framer/framer/bases.py
Tools/framer/framer/bases.py
+4
-4
No files found.
Demo/newmetaclasses/Eiffel.py
View file @
e81f5ef1
...
@@ -85,8 +85,8 @@ class EiffelMetaClass2(EiffelBaseMetaClass):
...
@@ -85,8 +85,8 @@ class EiffelMetaClass2(EiffelBaseMetaClass):
make_eiffel_method
=
EiffelDescriptor
make_eiffel_method
=
EiffelDescriptor
def
_test
(
metaclass
):
def
_test
(
metaclass
):
class
Eiffel
:
class
Eiffel
(
metaclass
=
metaclass
)
:
__metaclass__
=
metacl
ass
p
ass
class
Test
(
Eiffel
):
class
Test
(
Eiffel
):
...
...
Demo/newmetaclasses/Enum.py
View file @
e81f5ef1
...
@@ -82,11 +82,11 @@ class EnumInstance(int):
...
@@ -82,11 +82,11 @@ class EnumInstance(int):
def
__str__
(
self
):
def
__str__
(
self
):
return
"%s.%s"
%
(
self
.
__classname
,
self
.
__enumname
)
return
"%s.%s"
%
(
self
.
__classname
,
self
.
__enumname
)
class
Enum
:
class
Enum
(
metaclass
=
EnumMetaclass
)
:
__metaclass__
=
EnumMetacl
ass
p
ass
class
FullEnum
:
class
FullEnum
(
metaclass
=
FullEnumMetaclass
)
:
__metaclass__
=
FullEnumMetacl
ass
p
ass
def
_test
():
def
_test
():
...
...
Lib/test/test_descr.py
View file @
e81f5ef1
...
@@ -440,7 +440,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
...
@@ -440,7 +440,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
self
.
assertEqual
(
a
[
100
:
200
],
(
100
,
200
))
self
.
assertEqual
(
a
[
100
:
200
],
(
100
,
200
))
def
test_metaclass
(
self
):
def
test_metaclass
(
self
):
# Testing
__metaclass__
...
# Testing
metaclasses
...
class
C
(
metaclass
=
type
):
class
C
(
metaclass
=
type
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
__state
=
0
self
.
__state
=
0
...
...
Parser/asdl.py
View file @
e81f5ef1
...
@@ -10,8 +10,6 @@ browser.
...
@@ -10,8 +10,6 @@ browser.
Changes for Python: Add support for module versions
Changes for Python: Add support for module versions
"""
"""
#__metaclass__ = type
import
os
import
os
import
sys
import
sys
import
traceback
import
traceback
...
...
Tools/framer/framer/bases.py
View file @
e81f5ef1
...
@@ -96,8 +96,8 @@ class ModuleMetaclass(BaseMetaclass):
...
@@ -96,8 +96,8 @@ class ModuleMetaclass(BaseMetaclass):
p
(
"}"
)
p
(
"}"
)
class
Module
:
class
Module
(
metaclass
=
ModuleMetaclass
)
:
__metaclass__
=
ModuleMetacl
ass
p
ass
class
TypeMetaclass
(
BaseMetaclass
):
class
TypeMetaclass
(
BaseMetaclass
):
...
@@ -211,5 +211,5 @@ class TypeMetaclass(BaseMetaclass):
...
@@ -211,5 +211,5 @@ class TypeMetaclass(BaseMetaclass):
p
(
template
.
type_init_type
)
p
(
template
.
type_init_type
)
p
(
template
.
module_add_type
)
p
(
template
.
module_add_type
)
class
Type
:
class
Type
(
metaclass
=
TypeMetaclass
)
:
__metaclass__
=
TypeMetacl
ass
p
ass
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment