gpython
gpython copied to clipboard
Implement bool.real, bool.imag bool.conjugate()
There are some attributes that should be implemented for gpython.
Expected
>>> a = True
>>> a.imag
0
>>> a.real
1
>>> a.conjugate()
1
Actual
>>> a = True
>>> a.image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FIXME line of source goes here
AttributeError: "'bool' has no attribute 'image'"
>>> a.real
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FIXME line of source goes here
AttributeError: "'bool' has no attribute 'real'"
>>> a.conjugate()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FIXME line of source goes here
AttributeError: "'bool' has no attribute 'conjugate'"
@ncw I am going to assign this issue to the contributhon 2019 participants
I want to take a look at this issue 🙌
@parkchansoo Please go ahead. Here is a similar code you have to look at.
https://github.com/go-python/gpython/blob/7bc40057dc66c0ff15bb860c107b3c4664bc7b04/py/complex.go#L300