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


Groups > comp.lang.python > #35349

Re: Brython - Python in the browser

References (12 earlier) <CALwzidmh25wsKopUcpCGLy2fpZQeEq=NF2SWVv9=m3wvrgfMoQ@mail.gmail.com> <mailman.1179.1356134903.29569.python-list@python.org> <30bf668f-56e5-482f-b540-5cfa136348d1@googlegroups.com> <mailman.1188.1356165094.29569.python-list@python.org> <62459a43-88e7-4619-9742-a88021bb06ee@googlegroups.com>
Date 2012-12-22 20:08 +1100
Subject Re: Brython - Python in the browser
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1191.1356167308.29569.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Dec 22, 2012 at 7:54 PM, Pierre Quentel
<pierre.quentel@gmail.com> wrote:
>> Still, it tends to be a lot harder to explain, document, and read
>> documentation for, something that uses operators weirdly, rather than
>> keyword-searchable method names.
>
> You don't explain how to use the Python syntax (for instance the operator %, which behaves very differently between integers and strings) by explaining what happens in the underlying C code in the different cases, do you ?

Agreed, and it's sometimes confusing. I don't see "string % tuple" as
a good syntax; I prefer to spell it sprintf("format",arg,arg,arg).
When it comes to operators on strings, what I'd prefer to see is
something that does more-or-less what the operator does with integers
- for instance:

"This is a string" / " " ==> ["This","is","a","string"]

Taking a string modulo a tuple doesn't make any sense in itself, so it
CAN be given an alternative meaning. But if you see that in a program
and aren't sufficiently familiar with %s formatting to recognize it,
how are you going to locate the documentation on the subject? Googling
for 'python % string' doesn't help; 'python string modulo' brings up
an article on informit.com that explains the matter, but nothing
official. By contrast, searching for 'c sprintf' brings up heaps of
useful links, because 'sprintf' is a searchable keyword.

On the flip side, operator-based notations end up a lot more compact.
I'd definitely not want to give up, for instance, list comprehension
syntax. Difficulty of searching for docs is a downside, but definitely
not a blocker.

ChrisA

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


Thread

Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-19 10:19 -0800
  Re: Brython - Python in the browser jkn <jkn_gg@nicorp.f9.co.uk> - 2012-12-19 14:59 -0800
  Re: Brython - Python in the browser Terry Reedy <tjreedy@udel.edu> - 2012-12-19 19:07 -0500
    Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-20 01:37 -0800
      Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-20 20:56 +1100
      Re: Brython - Python in the browser Terry Reedy <tjreedy@udel.edu> - 2012-12-20 18:59 -0500
        Re: Brython - Python in the browser Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-21 02:05 +0000
          Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-21 16:07 +1100
        Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 08:16 -0800
          Re: Brython - Python in the browser Stefan Behnel <stefan_ml@behnel.de> - 2012-12-21 17:52 +0100
          Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-21 11:31 -0700
            Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 12:59 -0800
              Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-21 14:17 -0700
            Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 12:59 -0800
        Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 08:16 -0800
      Re: Brython - Python in the browser Rouslan Korneychuk <rouslank@msn.com> - 2012-12-21 03:31 -0500
        Re: Brython - Python in the browser Terry Reedy <tjreedy@udel.edu> - 2012-12-21 04:44 -0500
    Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-20 01:37 -0800
  Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-19 17:54 -0700
    Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-20 01:42 -0800
      Re: Brython - Python in the browser Stefan Behnel <stefan_ml@behnel.de> - 2012-12-21 12:25 +0100
        Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 04:38 -0800
          Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-21 23:57 +1100
            Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 07:36 -0800
              Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 02:48 +1100
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 08:36 -0800
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 09:52 +1100
                Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-21 16:45 -0700
                Re: Brython - Python in the browser Amirouche Boubekki <amirouche.boubekki@gmail.com> - 2012-12-22 00:50 +0100
                Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-21 16:51 -0700
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 23:59 -0800
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 23:59 -0800
                Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-21 16:57 -0700
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 11:08 +1100
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 23:57 -0800
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 19:31 +1100
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-22 00:54 -0800
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 20:08 +1100
                Re: Brython - Python in the browser Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-22 11:05 +0000
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 23:11 +1100
                Re: Brython - Python in the browser Dan Sommers <dan@tombstonezero.net> - 2012-12-22 20:31 +0000
                Re: Brython - Python in the browser Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-22 13:53 -0700
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-23 08:49 +1100
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-22 00:54 -0800
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 23:57 -0800
                Re: Brython - Python in the browser Chris Angelico <rosuav@gmail.com> - 2012-12-22 11:09 +1100
                Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 08:36 -0800
            Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 07:36 -0800
          Re: Brython - Python in the browser Duncan Booth <duncan.booth@invalid.invalid> - 2012-12-21 13:14 +0000
            Re: Brython - Python in the browser Stefan Behnel <stefan_ml@behnel.de> - 2012-12-21 14:34 +0100
        Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-21 04:38 -0800
        Re: Brython - Python in the browser Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-22 02:31 +0000
    Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-20 01:42 -0800
  Re: Brython - Python in the browser Terry Reedy <tjreedy@udel.edu> - 2012-12-19 21:46 -0500
  Re: Brython - Python in the browser Jamie Paul Griffin <jamie@kode5.net> - 2012-12-20 11:32 +0000
  Re: Brython - Python in the browser Pierre Quentel <pierre.quentel@gmail.com> - 2012-12-22 01:01 -0800

csiph-web