From 1a1b0265501ba1ca33db78c47e2a90d1495b697b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 27 Jun 2014 18:05:43 -0700 Subject: [PATCH] Articles usage. --- Differences.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Differences.md b/Differences.md index c1c823a..ee79975 100644 --- a/Differences.md +++ b/Differences.md @@ -3,7 +3,7 @@ This page is a proof-of-concept effort to document the differences between CPyth ## Differences By Design MicroPython is intended for constrained environments, in particular, microcontrollers, which have orders of magnitude less performance and memory than "desktop" systems on which CPython3 runs. This means that MicroPython must be designed with this constrained environment in mind, leaving out features which simply won't fit, or won't scale, with target systems. "By design" differences are unlikely to change. -1. MicroPython does not ship with an extensive standard library of modules. It's not possible and does not make sense, to provide the complete CPython3 library. Many modules are not usable or useful in the context of embedded systems, and there is not enough memory to deploy the entire library on small devices. So MicroPython takes the minimalist approach - only core datatypes (plus modules specific to particular hardware) are included with the interpreter, and all the rest is left as 3rd-party dependencies for particular user applications. The [micropython-lib](https://github.com/micropython/micropython-lib) project provides the non-monolithic standard library for MicroPython ([forum](http://forum.micropython.org/viewtopic.php?f=5&t=70)) +1. MicroPython does not ship with an extensive standard library of modules. It's not possible and does not make sense, to provide the complete CPython3 library. Many modules are not usable or useful in the context of embedded systems, and there is not enough memory to deploy the entire library on small devices. So MicroPython takes the minimalist approach - only core datatypes (plus modules specific to particular hardware) are included with the interpreter, and all the rest is left as 3rd-party dependencies for particular user applications. The [micropython-lib](https://github.com/micropython/micropython-lib) project provides a non-monolithic standard library for MicroPython ([forum](http://forum.micropython.org/viewtopic.php?f=5&t=70)) 1. Unlike CPython3, which uses reference-counting, MicroPython uses garbage collection as the primary means of memory management. 1. MicroPython does not implement complete CPython object data model, but only a subset of it. Advanced usages of multiple inheritance, ``__new__`` method may not work. Method resolution order is different (#525). Metaclasses are not supported (at least yet). 1. By virtue of being "micro", MicroPython implements only subset of functionality and parameters of particular functions and classes. Each specific issue may be treated as "implementation difference" and resolved, but there unlikely will ever be 100% coverage of CPython features. @@ -23,7 +23,7 @@ Known issues are essentially bugs, misfeatures, and omissions considered such, a 1. Some functions don't perform argument checking well enough, which potentially may lead to crash if wrong argument types are passed. 1. Some functions use ``assert()`` for argument checking, which will lead to crash if wrong argument types are passed/erroneous conditions are faced. This should be replaced with Python exception raising. -1. It's not possible to override builtin functions in a general way. So far - no "builtins" module is implemented, so any overrides work within the current module only. +1. It's not possible to override builtin functions in a general way. So far - no "builtins" module is implemented, so any overrides work within a current module only. 1. There's no support for persistent bytecode, and running bytecode (vs running Python source). [#222](//github.com/micropython/micropython/issues/222) 1. print() function doesn't use the Python stream infrastructure, it uses the underlying C printf() function directly. This means if you override sys.stdout, then print() won't be affected. [#209](//github.com/micropython/micropython/issues/209) 1. Some more advanced usages of package/module importing is not yet fully implemented. [#298](//github.com/micropython/micropython/issues/298)