← 输入框|github.com|刷新
Skip to content

Implement bool.real, bool.imag bool.conjugate() #73

Open

Description

@corona10

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'"

Activity

  1. corona10 commented on Sep 9, 2019

    @corona10
    CollaboratorAuthor

    @ncw I am going to assign this issue to the contributhon 2019 participants

  2. parkchansoo commented on Sep 9, 2019

    @parkchansoo

    I want to take a look at this issue 🙌

  3. corona10 commented on Sep 9, 2019

    @corona10
    CollaboratorAuthor

    @parkchansoo
    Please go ahead.
    Here is a similar code you have to look at.

    ComplexType.Dict["real"] = &Property{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions