Changes between Version 26 and Version 37 of Ticket #13110


Ignore:
Timestamp:
01/17/18 17:19:39 (4 years ago)
Author:
vdelecroix
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13110

    • Property Status changed from needs_work to needs_info
    • Property Branch changed from to u/epilys/deprecate_global_realnumber___and_complexnumber__
    • Property Keywords complex beginner removed
    • Property Commit changed from to c1995f12a8529bdb5c5ff25288b481caf01a40c9
    • Property Milestone changed from sage-6.4 to sage-8.2
  • Ticket #13110 – Description

    v26 v37  
    1 The `RealNumber()` and `ComplexNumber()` global functions are meant for the Sage preparser and shouldn't be used directly. For example, the following doesn't work (and it shouldn't):
     1The `RealNumber()` and `ComplexNumber()` global functions are converting string to floating-point numbers. They do not do what their names suggest
    22{{{
     3sage: RealNumber(1/3)
     4Traceback (most recent call last):
     5...
     6TypeError: unable to convert '1/3' to a real number
    37sage: ComplexNumber(complex('13.8+6.2j'))
     8Traceback (most recent call last):
     9...
    410TypeError: unable to coerce to a ComplexNumber: <type 'str'>
    511}}}
     12
     13These two functions are mostly intended for the Sage preparser and shouldn't be used directly. There are two proposals under discussion:
     14 - deprecate them in view of removing them from the global namespace
     15 - make them what they should be: factory for real/complex numbers