Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WIP: Add uuid module #504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mattytrentini wants to merge 2 commits into micropython:master
base: master
Choose a base branch
Loading
from mattytrentini:add-uuid

Conversation

@mattytrentini
Copy link
Contributor

@mattytrentini mattytrentini commented Jul 6, 2022

Basic functionality (notably, all of the uuidX() methods) of most of the uuid module appears to work, or at least generate reasonable-looking results.

This started as a copy of the CPython code (see README) and then some functionality was trimmed or modified in order to execute under MicroPython.

Still to-do:

  • Update tests to pass
  • Extend README.md - how to execute, which functionality is supported etc
  • Remove large docstrings

andrewleech and KnorkFox reacted with thumbs up emoji
# 0x01b21dd213814000 is the number of 100-ns intervals between the
# UUID epoch 1582年10月15日 00:00:00 and the Unix epoch 1970年01月01日 00:00:00.
# TODO mst This timestamp will need to be adjusted (MicroPython Epoch is different)
timestamp = nanoseconds // 100 + 0x01b21dd213814000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe try using time.gmtime(0) to find the Epoch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dpgeorge dpgeorge dpgeorge left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /