Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Why the result is not the same in Python and Sublime Text 3? #6

Closed
0xdolan opened this issue Aug 24, 2018 · 1 comment
Closed

Why the result is not the same in Python and Sublime Text 3? #6

0xdolan opened this issue Aug 24, 2018 · 1 comment

Comments

@0xdolan
Copy link

0xdolan commented Aug 24, 2018

When testing your module, the result in Sublime Text 3 and Python IDLE is the same and none of them show the Day name (for instance: Jomeh), but when using the Python or CMD directly to work with the same code, it works fine!
Test:

from persiantools.jdatetime import JalaliDate
from datetime import datetime
print(datetime.today()) # Output: 2018-08-24 12:33:20.700418
print(JalaliDate.today()) # Output: 1397-06-02
print(JalaliDate(1369, 7, 1)) # Output: 1369-07-01

1
2

@mhajiloo
Copy link
Owner

when using cmd => __repr__
when using print => __str__

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants