Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #72538

Re: Micro Python -- a lean and efficient implementation of Python 3

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; ';-)': 0.03; 'encoding': 0.05; 'subject:Python': 0.06; 'subject: -- ': 0.07; 'utf-8': 0.07; 'matched': 0.09; 'pep': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'amd64': 0.16; 'dump': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic': 0.16; 'non- ascii': 0.16; 'portable': 0.16; 'presume': 0.16; 'purported': 0.16; 'string)': 0.16; 'unicode.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'bit': 0.19; 'implementing': 0.19; 'seems': 0.21; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'bytes': 0.24; 'documented': 0.24; 'string,': 0.24; 'unicode': 0.24; 'fairly': 0.24; 'paul': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'possibly': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'rest': 0.29; 'am,': 0.29; 'unix': 0.29; "doesn't": 0.30; 'strongly': 0.30; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; "i'm": 0.30; '(my': 0.31; '3.x': 0.31; 'subject:skip:i 10': 0.31; 'languages': 0.32; 'supposed': 0.32; 'linux': 0.33; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'clear': 0.37; 'feedback': 0.38; 'represent': 0.38; 'system,': 0.38; 'planning': 0.38; 'little': 0.38; 'supporting': 0.39; 'either': 0.39; 'skip:p 20': 0.39; 'major': 0.40; 'how': 0.40; 'above,': 0.60; 'course': 0.61; "you're": 0.61; 'making': 0.63; 'mar': 0.68; 'fact,': 0.69; 'safe': 0.72; 'touch': 0.74; '2014,': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=iQLgkG0K0Q5CmOyhZtB+lKqnKsEWT3p1tR05sPuqLpg=; b=x50tQJxdrQeX9KviXcY0/XSlXypxgFEVMw/jHdzaraspc6NWgnxvs7i7/XfnUD5rUM Avdierao9W9JQgcTgaT4OQMRVWF/eis4Q9Dsm6NtQxJhfF9ZEWPldxJ3ZapdHpcuCJs7 cAfSH7c2IsIHreO28IBXt87JT+uQja1QSI8VgS87TPcUczOSJd0AScYlhUwalUACQj2e xREZDtRN+o9LynQWn3I+pTIJnArgxfpX+VfnBMIbnfSsbnWVBr8ngg8nVaCcTdMvWab2 NSH8Or6wfF0BJBZIEGys5pF4a8qru7tq3e5/DGfng+geQY7DbJZOtfg8+TBJX5bxrUfB Vwtw==
MIME-Version 1.0
X-Received by 10.52.93.201 with SMTP id cw9mr2673128vdb.80.1401815338015; Tue, 03 Jun 2014 10:08:58 -0700 (PDT)
In-Reply-To <20140603194949.3147497d@x34f>
References <CANw+MznPsKgJiW6e_O370VUsmVVxBfQ=M_7WUyU7+wNh+-qefA@mail.gmail.com> <CAPTjJmoB0eMMMhjUz++yYV2CEv=2xUXx7P8UuRvCk7y7gB-4+Q@mail.gmail.com> <20140603194949.3147497d@x34f>
Date Wed, 4 Jun 2014 03:08:57 +1000
Subject Re: Micro Python -- a lean and efficient implementation of Python 3
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.10636.1401815340.18130.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1401815340 news.xs4all.nl 2892 [2001:888:2000:d::a6]:55199
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:72538

Show key headers only | View raw


On Wed, Jun 4, 2014 at 2:49 AM, Paul Sokolovsky <pmiscml@gmail.com> wrote:
> As can be seen from the dump above, MicroPython perfectly works on a
> Linux system, so we encourage any pythonista to touch a little bit of
> Python magic and give it a try! ;-) And we of course interested to get
> feedback how portable it is, etc.
>

With that encouragement, I just cloned your repo and built it on amd64
Debian Wheezy. Works just fine! Except... I've just found one fairly
major problem with your support of Python 3.x syntax. Your str type is
documented as not supporting Unicode. Is that a current flaw that
you're planning to remove, or a design limitation? Either way, I'm a
bit dubious about a purported version 1 that doesn't do one of the
things that Py3 is especially good at - matched by very few languages
in its encouragement of best practice with Unicode support.

What is your str type actually able to support? It seems to store
non-ASCII bytes in it, which I presume are supposed to represent the
rest of Latin-1, but I wasn't able to print them out:

Micro Python v1.0.1-144-gb294a7e on 2014-06-04; UNIX version
>>> print("asdf\xfdqwer")

Python 3.5.0a0 (default:6a0def54c63d, Mar 26 2014, 01:11:09)
[GCC 4.7.2] on linux
>>> print("asdf\xfdqwer")
asdfýqwer

In fact, printing seems to work with bytes:

>>> print("asdf\xc3\xbdqwer")
asdfýqwer

(my terminal uses UTF-8, this is the UTF-8 encoding of the above string)

I would strongly recommend either implementing all of PEP 393, or at
least making it very clear that this pretends everything is bytes -
and possibly disallowing any codepoint >127 in any string, which will
at least mean you're safe on all ASCII-compatible encodings.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Micro Python -- a lean and efficient implementation of Python 3 Chris Angelico <rosuav@gmail.com> - 2014-06-04 03:08 +1000

csiph-web