Module names with and without a "u"

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
BigMan
Posts: 22
Joined: Sat Oct 29, 2016 2:29 pm

Module names with and without a "u"

Post by BigMan » Sun Dec 18, 2016 8:44 am

In the Micropython documentation, I find very often similar modules which seems to have only a different names. E.g. there is a module utime and time. What is the story behind that?

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Module names with and without a "u"

Post by deshipu » Sun Dec 18, 2016 9:55 am

The modules that start with "u" are simplified implementations specific to MicroPython, often not implementing the full library, as defined by Python. They will often have an alias with a name without the "u". This is done so that users can substitute a more complete implementation if needed.

Post Reply