Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25854 Ambari With Python3 Support
  3. AMBARI-25901

modify Function Round from python2 to python3

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7.5
    • None
    • None
    • Ambari:Ambari-2.7.5

      OS:        OpenEuler-22.03

      Python: Python 3.9.9

    Description

      In pytthon2, round() function work as follows:

           round(2.5) => 3.0

      In python3, round() function work as follows:

           round(2.5) => 2

       

      in python2 it return a rounding number 3.0.

      in python3 it return a Integer 2, which is the closest even number to 2.5.

      this different will cause some problem, to aovid failure, I would like to add this function to make round() function work as python2 in python3.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Charming603473 Charming Wu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: