GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-118469: Add documentation for sqlite3 PEP-249 constructors by dave-r12 · Pull Request #122091 · python/cpython Conversation
|
|
Hi, I was looking at #118469. The original PR hasn't been updated for awhile, so incorporated the feedback on that PR here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ok, so let's add a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authered-by: Firat <[email protected]>
| .. function:: DateFromTicks(ticks) | ||
|
|
||
| This function constructs an object holding a date value from the given ticks | ||
| value (number of seconds since the epoch; see the documentation of the |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I assume it's the UNIX epoch and not Gregorian epoch? Can it be a fractional number of seconds or not?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I assume it's the UNIX epoch and not Gregorian epoch?
Yeah the UNIX epoch.
Can it be a fractional number of seconds or not?
This was taken from PEP-249. Should we get clarification there?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it was not considered at that time. In general, we don't change PEPs (unless there is a real issue with the PEP I think, but I am not aware of a precedent). Best is to ask @erlend-aasland: should we leave it imprecise, or is there some assumptions that I'm not aware of?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| This function constructs an object holding a time value. | ||
|
|
||
| .. function:: Timestamp(year, month, day, hour, minute, second) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Are the second allowed to be fractional or not? (same question for Time())
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
In my tests, Doing something like this fails:
sqlite3.Time(12, 30, 45.12)
But this succeeds:
sqlite3.Time(12, 30, 45, 12)
However, it is not mentioned in PEP-249. How should we handle that?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh. I think should definitely be documented and the signature of Time should be something like Time(h, m, s[, ms]) (check the syntax in the time module, I don't remember now).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Re-reading the issue, I believe the intention was to document these constructors per PEP-249. I'm not sure if this is more an implementation detail. Will wait for @erlend-aasland guidance.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @erlend-aasland . I added the co-author-by trailer to the commit. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.