Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
18a6eb9e
Commit
18a6eb9e
authored
Mar 31, 2014
by
Damien George
Browse files
Merge branch 'master' of github.com:micropython/micropython
parents
3ff2d038
183faa3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/basics/class_inherit_mul.py
0 → 100644
View file @
18a6eb9e
class
A
:
def
__init__
(
self
,
x
):
print
(
'A init'
,
x
)
self
.
x
=
x
def
f
(
self
):
print
(
self
.
x
)
def
f2
(
self
):
print
(
self
.
x
)
class
B
:
def
__init__
(
self
,
x
):
print
(
'B init'
,
x
)
self
.
x
=
x
def
f
(
self
):
print
(
self
.
x
)
def
f3
(
self
):
print
(
self
.
x
)
class
Sub
(
A
,
B
):
def
__init__
(
self
):
A
.
__init__
(
self
,
1
)
B
.
__init__
(
self
,
2
)
print
(
'Sub init'
)
def
g
(
self
):
print
(
self
.
x
)
o
=
Sub
()
print
(
o
.
x
)
o
.
f
()
o
.
f2
()
o
.
f3
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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