5 changed files with 62 additions and 4 deletions
@ -0,0 +1,7 @@
|
||||
{ |
||||
"nodes":[ |
||||
{"id":"a4573e875ea36f20","x":-1246,"y":-354,"width":928,"height":275,"type":"text","text":"```\n3537923 function calls (3418179 primitive calls) in 6.790 seconds\n\n185542/179027 0.010 0.000 0.011 0.000 {built-in method builtins.len}\n 176870 0.009 0.000 0.009 0.000 {built-in method unicodedata.east_asian_width}\n 174285 0.009 0.000 0.009 0.000 {built-in method unicodedata.category}\n 169998 0.020 0.000 0.029 0.000 /home/one/github/Varie/pyTermTk.002/TermTk/TTkCore/string.py:603\n 169998 0.022 0.000 0.031 0.000 /home/one/github/Varie/pyTermTk.002/TermTk/TTkCore/string.py:604\n \n 21356 0.003 0.000 0.004 0.000 /home/one/github/Varie/pyTermTk.002/TermTk/TTkCore/string.py:593\n\n```"}, |
||||
{"id":"e0d1286c4dfd7bd0","x":-1246,"y":-49,"width":928,"height":250,"type":"text","text":"```\n3559400 function calls (3440738 primitive calls) in 16.278 seconds\n\n184908/178405 0.010 0.000 0.011 0.000 {built-in method builtins.len}\n 184286 0.009 0.000 0.009 0.000 {built-in method unicodedata.east_asian_width}\n 182038 0.009 0.000 0.009 0.000 {built-in method unicodedata.category}\n 177747 0.021 0.000 0.029 0.000 /home/one/github/Varie/pyTermTk.002/TermTk/TTkCore/string.py:603\n 177747 0.023 0.000 0.032 0.000 /home/one/github/Varie/pyTermTk.002/TermTk/TTkCore/string.py:604\n\n 21851 0.003 0.000 0.004 0.000 /home/one/github/Varie/pyTermTk.002/TermTk/TTkCore/string.py:593\n```"} |
||||
], |
||||
"edges":[] |
||||
} |
||||
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3 |
||||
|
||||
# MIT License |
||||
# |
||||
# Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> |
||||
# |
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
# of this software and associated documentation files (the "Software"), to deal |
||||
# in the Software without restriction, including without limitation the rights |
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
# copies of the Software, and to permit persons to whom the Software is |
||||
# furnished to do so, subject to the following conditions: |
||||
# |
||||
# The above copyright notice and this permission notice shall be included in all |
||||
# copies or substantial portions of the Software. |
||||
# |
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
# SOFTWARE. |
||||
|
||||
class A(): |
||||
__slots__ = ('a') |
||||
def __init__(self): |
||||
self.a = 1 |
||||
|
||||
class B(): |
||||
# __slots__ = ('b') |
||||
def __init__(self): |
||||
self.b = 1 |
||||
|
||||
class C(A,B): |
||||
__slots__ = ('c') |
||||
def __init__(self): |
||||
A.__init__(self) |
||||
B.__init__(self) |
||||
self.c = 1 |
||||
# self.d = 1 |
||||
|
||||
c = C() |
||||
|
||||
print(c) |
||||
Loading…
Reference in new issue