Skip to content

preparser does not know about python notation for complex numbers #4501

@jasongrout

Description

@jasongrout
sage: 1j
------------------------------------------------------------
   File "<ipython console>", line 1
     Integer(1)j
               ^
SyntaxError: invalid syntax

but in python:

sage: preparser(False)
sage: 1j
1j
sage: type(1j)
<type 'complex'>

Note that this does work now:

sage: 1rj
1j
sage: 1rj == complex('j')
True

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/4501

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions