I am developing a set of classes to be used with terminals. I am deriving from UART as follows:
Code: Select all
from pyb import UART class serialTerminal(UART): def __init__(self,port,speed,maxCol,maxRow): self.maxCol = maxCol self.maxRow = maxRow troubleTerminal = serialTerminal(6,9600,80,25) # this is line 61
I this example, port 6, speed 9600 baud, 80 columns and 25 lines. The last two values shall be stored in the serialTerminal object.
However, what happens, is this:
I have read the documentation about inheritance in Python, also about usage of super and __init__. And i also invested hours in searching Google, but so far I don't understand, why the system obviously passes on the maxCol and maxRow parameters to the base class.Traceback (most recent call last):
File "main.py", line 61, in <module>
ValueError: unsupported combination of bits and parity
MicroPython v1.9.2 on 2017-08-23; PYBv1.1 with STM32F405RG
What am I overlooking here? Thanks for your help.