namedtuple subclasses should set __slots__=()
This commit is contained in:
parent
fcae62eb86
commit
587b08a1e4
2 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,8 @@ class RenderContext(namedtuple('RenderContext', ('width', 'height', 'ctx', 'prog
|
|||
"""
|
||||
A OpenGL Render Context with program and framebuffer. Can only be used by thread that created it.
|
||||
"""
|
||||
__slots__ = ()
|
||||
|
||||
@classmethod
|
||||
def create(cls, width, height):
|
||||
ctx = ModernGL.create_standalone_context()
|
||||
|
|
|
@ -4,6 +4,7 @@ import numpy as np
|
|||
|
||||
|
||||
class Mesh(namedtuple('Mesh', ('top', 'sides', 'bottom'))):
|
||||
__slots__ = ()
|
||||
empty_faces = np.empty((0, 3, 3)).astype(np.int32)
|
||||
|
||||
def tolist(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue