Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4690

Add repr support to bson.tz_util.FixedOffset

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Add repr support to bson.tz_util.FixedOffset. Here's what the repr currently looks like:

      >>> from bson.tz_util import FixedOffset, utc
      >>> utc
      <bson.tz_util.FixedOffset object at 0x104ec2840>
      >>> FixedOffset(60, 'tzName')
      <bson.tz_util.FixedOffset object at 0x104b0cc20>
      

      Here's what it should look like:

      >>> from bson.tz_util import FixedOffset, utc
      >>> utc
      FixedOffset(datetime.timedelta(0), 'UTC')
      >>> FixedOffset(60, 'tzName')
      FixedOffset(datetime.timedelta(seconds=3600), 'tzName')
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: