Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #25841 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2012-07-23 17:59 +1000 |
| Last post | 2012-07-23 17:50 -0700 |
| Articles | 20 on this page of 59 — 23 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: the meaning of r’.......‘ Chris Angelico <rosuav@gmail.com> - 2012-07-23 17:59 +1000
Re: the meaning of r’.......‘ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 08:07 +0000
Re: the meaning of rユ.......ï¾ Roy Smith <roy@panix.com> - 2012-07-23 08:55 -0400
Re: the meaning of rユ.......�¾ Chris Angelico <rosuav@gmail.com> - 2012-07-23 23:06 +1000
Re: the meaning of r¹.......?34 Roy Smith <roy@panix.com> - 2012-07-23 09:22 -0400
Re: the meaning of rユ.......�¾ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 15:59 +0000
Re: the meaning of rユ.......�¾ Chris Angelico <rosuav@gmail.com> - 2012-07-24 02:10 +1000
Re: the meaning of r?.......?¾ Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-07-23 16:46 -0400
Re: the meaning of r`.......` Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-07-24 10:45 +0200
Re: the meaning of rユ.......ï¾ Alex Strickland <sscc@mweb.co.za> - 2012-07-23 15:10 +0200
Re: the meaning of rユ.......�¾ Dave Angel <d@davea.name> - 2012-07-23 09:22 -0400
Re: the meaning of rユ.......�¾ Larry Hudson <orgnut@yahoo.com> - 2012-07-24 00:01 -0700
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 15:24 +0200
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-23 23:35 +1000
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 15:52 +0200
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 15:55 +0200
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 15:59 +0200
Re: the meaning of rユ.......ï¾ Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-07-23 16:08 +0200
Re: the meaning of rユ.......ï¾ Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-23 15:43 +0100
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 16:43 +0200
Re: the meaning of rユ.......ï¾ Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-23 16:29 +0100
Re: the meaning of rユ.......ï¾ John Gordon <gordon@panix.com> - 2012-07-23 15:56 +0000
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-24 02:09 +1000
Re: the meaning of rユ.......ï¾ Ben Finney <ben+python@benfinney.id.au> - 2012-07-25 00:35 +1000
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-25 00:50 +1000
Re: the meaning of rユ.......ï¾ Maarten <maarten.sneep@knmi.nl> - 2012-07-24 07:44 -0700
Re: the meaning of rユ.......ï¾ Ben Finney <ben+python@benfinney.id.au> - 2012-07-25 13:07 +1000
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-25 14:11 +1000
Re: the meaning of rユ.......ï¾ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-25 06:07 +0000
Re: the meaning of rユ.......ï¾ Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-25 07:37 +0100
Re: the meaning of rユ.......ï¾ Ben Finney <ben+python@benfinney.id.au> - 2012-07-25 16:43 +1000
Re: the meaning of rユ.......ï¾ Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-25 08:13 +0100
Re: the meaning of rユ.......ï¾ Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-25 09:21 -0600
Re: the meaning of rユ.......ï¾ Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-24 10:36 -0600
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-25 02:42 +1000
Re: the meaning of rユ.......ï¾ Ethan Furman <ethan@stoneleaf.us> - 2012-07-24 09:59 -0700
Re: the meaning of rユ.......ï¾ Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-24 10:02 -0400
Re: the meaning of rユ.......ï¾ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 17:10 +0000
Re: the meaning of rユ.......ï¾ rusi <rustompmody@gmail.com> - 2012-07-23 08:08 -0700
Re: the meaning of rユ.......ï¾ Jan Riechers <janpeterr@freenet.de> - 2012-07-23 21:29 +0300
Re: the meaning of rユ.......ï¾ Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-23 10:10 -0400
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 16:40 +0200
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-24 00:53 +1000
Re: the meaning of rユ.......ï¾ Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-23 11:02 -0400
Re: the meaning of rユ.......ï¾ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 16:54 +0000
Re: the meaning of rユ.......ï¾ Chris Angelico <rosuav@gmail.com> - 2012-07-24 00:19 +1000
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 16:42 +0200
Re: the meaning of rユ.......ï¾ Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-07-23 14:10 -0400
Re: the meaning of rユ.......ï¾ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 16:53 +0000
Re: the meaning of r?.......ï¾ MRAB <python@mrabarnett.plus.com> - 2012-07-23 16:46 +0100
Re: the meaning of rユ.......ï¾ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 16:33 +0000
Re: the meaning of rユ.......ï¾ Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-07-23 14:43 -0400
Re: the meaning of rユ.......ï¾ Henrik Faber <hfaber@invalid.net> - 2012-07-23 15:26 +0200
Re: the meaning of rïŸ.......ïŸ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-23 15:49 +0000
Re: the meaning of rïŸ.......ïŸ Serhiy Storchaka <storchaka@gmail.com> - 2012-07-26 16:34 +0300
Re: the meaning of rユ.......ï¾ Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-07-23 12:19 -0400
Re: the meaning of r?.......?¾ Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-07-23 13:44 -0400
Re: the meaning of r’.......‘ John Roth <johnroth1@gmail.com> - 2012-07-23 17:50 -0700
Re: the meaning of r’.......‘ John Roth <johnroth1@gmail.com> - 2012-07-23 17:50 -0700
Page 1 of 3 [1] 2 3 Next page →
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-07-23 17:59 +1000 |
| Subject | Re: the meaning of r’.......‘ |
| Message-ID | <mailman.2455.1343030385.4697.python-list@python.org> |
On Fri, Jul 20, 2012 at 5:56 PM, levi nie <levinie001@gmail.com> wrote: > the meaning of r’.......‘? It's a raw string. http://docs.python.org/py3k/tutorial/introduction.html#strings Chris Angelico
[toc] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2012-07-23 08:07 +0000 |
| Message-ID | <500d0632$0$1504$c3e8da3$76491128@news.astraweb.com> |
| In reply to | #25841 |
On Mon, 23 Jul 2012 17:59:42 +1000, Chris Angelico wrote: > On Fri, Jul 20, 2012 at 5:56 PM, levi nie <levinie001@gmail.com> wrote: >> the meaning of r’.......‘? > > It's a raw string. Technically, no, it's a SyntaxError, because the Original Poster has used some sort of "Smart Quotes" characters r’‘ instead of good old fashioned typewriter-style quotes r'' or r"". If you're going to ask programming questions using an email client that changes what you type, including smart quotes, special hyphens or other characters, you're going to have a bad time. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2012-07-23 08:55 -0400 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <roy-D44797.08552123072012@news.panix.com> |
| In reply to | #25843 |
In article <500d0632$0$1504$c3e8da3$76491128@news.astraweb.com>,
Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
> Technically, no, it's a SyntaxError, because the Original Poster has used
> some sort of "Smart Quotes" characters r’‘ instead of good old fashioned
> typewriter-style quotes r'' or r"".
>
> If you're going to ask programming questions using an email client that
> changes what you type, including smart quotes, special hyphens or other
> characters, you're going to have a bad time.
Some day, we're going to have programming languages that take advantage
of the full unicode character set. Right now, we're working in ASCII
and creating silly digrams/trigrams like r'' for raw strings (and triple-quotes for multi-line
strings). Not to mention <=, >=, ==, !=. And in languages other than
python, things like ->, => (arrows for structure membership), and so on.
When I first started writing C code, it was on ASR-33s which did not
support curly baces. We wrote ¥( for { and ¥) for } (although I think the translation was
handled entirely in the TTY driver and the compiler was never in on the
joke). 20 or 30 years from now, people are going to look back on us
neanderthals and laugh about how we had to write r''.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-07-23 23:06 +1000 |
| Subject | Re: the meaning of rユ.......�¾ |
| Message-ID | <mailman.2463.1343048808.4697.python-list@python.org> |
| In reply to | #25857 |
On Mon, Jul 23, 2012 at 10:55 PM, Roy Smith <roy@panix.com> wrote: > Some day, we're going to have programming languages that take advantage > of the full unicode character set. Right now, we're working in ASCII > and creating silly digrams/trigrams like r'' for raw strings (and triple-quotes for multi-line > strings). Not to mention <=, >=, ==, !=. And in languages other than > python, things like ->, => (arrows for structure membership), and so on. REXX predates Unicode, I think, or at least its widespread adoption, but it has a non-ASCII operator: http://www.rexswain.com/rexx.html#operators But personally, I've always used backslash. It's nothing to do with ASCII and everything to do with having it on the keyboard. Before you get a language that uses full Unicode, you'll need to have fairly generally available keyboards that have those keys. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2012-07-23 09:22 -0400 |
| Subject | Re: the meaning of r¹.......?34 |
| Message-ID | <roy-F53434.09223123072012@news.panix.com> |
| In reply to | #25859 |
In article <mailman.2463.1343048808.4697.python-list@python.org>, Chris Angelico <rosuav@gmail.com> wrote: > But personally, I've always used backslash. It's nothing to do with > ASCII and everything to do with having it on the keyboard. Before you > get a language that uses full Unicode, you'll need to have fairly > generally available keyboards that have those keys. The same was true of "languages that use full ASCII". ASR-33s didn't support full ASCII. Neither did punched cards. All in good time.
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2012-07-23 15:59 +0000 |
| Subject | Re: the meaning of rユ.......�¾ |
| Message-ID | <500d74ff$0$29978$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #25859 |
On Mon, 23 Jul 2012 23:06:45 +1000, Chris Angelico wrote: > On Mon, Jul 23, 2012 at 10:55 PM, Roy Smith <roy@panix.com> wrote: >> Some day, we're going to have programming languages that take advantage >> of the full unicode character set. Right now, we're working in ASCII >> and creating silly digrams/trigrams like r'' for raw strings (and >> triple-quotes for multi-line strings). Not to mention <=, >=, ==, !=. >> And in languages other than python, things like ->, => (arrows for >> structure membership), and so on. > > REXX predates Unicode, I think, or at least its widespread adoption, but > it has a non-ASCII operator: > > http://www.rexswain.com/rexx.html#operators Only one? Pfft. What's the difference between >> "Strictly greater than" and < "Greater than"? > But personally, I've always used backslash. It's nothing to do with > ASCII and everything to do with having it on the keyboard. Before you > get a language that uses full Unicode, you'll need to have fairly > generally available keyboards that have those keys. Or sensible, easy to remember mnemonics for additional characters. Back in 1984, Apple Macs made it trivial to enter useful non-ASCII characters from the keyboard. E.g.: Shift-4 gave $ Option-4 gave ¢ Option-c gave © Option-r gave ® Dead-keys made accented characters easy too: Option-u o gave ö Option-u e gave ë etc. And because it was handled by the operating system, *every* application supported it, automatically. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-07-24 02:10 +1000 |
| Subject | Re: the meaning of rユ.......�¾ |
| Message-ID | <mailman.2485.1343059821.4697.python-list@python.org> |
| In reply to | #25896 |
On Tue, Jul 24, 2012 at 1:59 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: >> http://www.rexswain.com/rexx.html#operators > > Only one? Pfft. > > What's the difference between >> "Strictly greater than" and < "Greater > than"? The non-strict forms strip trailing spaces off strings before comparing. I can't remember now if there are other differences. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2012-07-23 16:46 -0400 |
| Subject | Re: the meaning of r?.......?¾ |
| Message-ID | <mailman.2497.1343076372.4697.python-list@python.org> |
| In reply to | #25896 |
On 23 Jul 2012 15:59:59 GMT, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> declaimed the following in
gmane.comp.python.general:
>
> What's the difference between >> "Strictly greater than" and < "Greater
> than"?
>
Massive confusion?
I think you meant to compare
>>
with
>
NOT
<
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> |
|---|---|
| Date | 2012-07-24 10:45 +0200 |
| Subject | Re: the meaning of r`.......` |
| Message-ID | <julncb$sdm$1@r03.glglgl.gl> |
| In reply to | #25896 |
Am 23.07.2012 17:59 schrieb Steven D'Aprano: >> Before you >> get a language that uses full Unicode, you'll need to have fairly >> generally available keyboards that have those keys. Or at least keys or key combinations for the stuff you need, which might differ e. g. with the country you live in. There are countries which have keyboards with äöüß, others with èàéî, and so on. > Or sensible, easy to remember mnemonics for additional characters. Back > in 1984, Apple Macs made it trivial to enter useful non-ASCII characters > from the keyboard. E.g.: > > Shift-4 gave $ > Option-4 gave ¢ > Option-c gave © > Option-r gave ® So what? If I type Shift-3 here, I get a § (U+00A7). And the ° (U+00B0) comes with Shift-^, the µ (U+00B5) with AltGr-M and the € sign with AltGr+E. > Dead-keys made accented characters easy too: > > Option-u o gave ö > Option-u e gave ë And if I had a useful OS here at work, I even could use the compose key to produce many other non-ASCII characters. To be able to create each and every of them is not needed in order to have support for them in a language, just the needed ones. Useful editors use them as well, although you have not all of them on your keyboard. Thomas
[toc] | [prev] | [next] | [standalone]
| From | Alex Strickland <sscc@mweb.co.za> |
|---|---|
| Date | 2012-07-23 15:10 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <mailman.2465.1343049472.4697.python-list@python.org> |
| In reply to | #25857 |
On 2012/07/23 02:55 PM, Roy Smith wrote: > Some day, we're going to have programming languages that take advantage > of the full unicode character set. Right now, we're working in ASCII > and creating silly digrams/trigrams like r'' for raw strings (and triple-quotes for multi-line > strings). Not to mention <=, >=, ==, !=. And in languages other than > python, things like ->, => (arrows for structure membership), and so on. It'll be pretty. -- Regards Alex
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2012-07-23 09:22 -0400 |
| Subject | Re: the meaning of rユ.......�¾ |
| Message-ID | <mailman.2466.1343049759.4697.python-list@python.org> |
| In reply to | #25857 |
On 07/23/2012 09:06 AM, Chris Angelico wrote: > On Mon, Jul 23, 2012 at 10:55 PM, Roy Smith <roy@panix.com> wrote: >> Some day, we're going to have programming languages that take advantage >> of the full unicode character set. Right now, we're working in ASCII >> and creating silly digrams/trigrams like r'' for raw strings (and triple-quotes for multi-line >> strings). Not to mention <=, >=, ==, !=. And in languages other than >> python, things like ->, => (arrows for structure membership), and so on. > REXX predates Unicode, I think, or at least its widespread adoption, > but it has a non-ASCII operator: > > http://www.rexswain.com/rexx.html#operators > > But personally, I've always used backslash. It's nothing to do with > ASCII and everything to do with having it on the keyboard. Before you > get a language that uses full Unicode, you'll need to have fairly > generally available keyboards that have those keys. > > ChrisA Keyboards with 110,000 keys on them; wonderful. And much larger characters on the screen, so that all those can be distinguished. And of course all fonts have to support all those characters. Back to 20 character lines. -- DaveA
[toc] | [prev] | [next] | [standalone]
| From | Larry Hudson <orgnut@yahoo.com> |
|---|---|
| Date | 2012-07-24 00:01 -0700 |
| Subject | Re: the meaning of rユ.......�¾ |
| Message-ID | <FYidnRS7FaKq1ZPNnZ2dnUVZ5qydnZ2d@giganews.com> |
| In reply to | #25862 |
On 07/23/2012 06:22 AM, Dave Angel wrote:
> On 07/23/2012 09:06 AM, Chris Angelico wrote:
>> On Mon, Jul 23, 2012 at 10:55 PM, Roy Smith <roy@panix.com> wrote:
>>> Some day, we're going to have programming languages that take advantage
>>> of the full unicode character set. Right now, we're working in ASCII
>>> and creating silly digrams/trigrams like r'' for raw strings (and triple-quotes for multi-line
>>> strings). Not to mention <=, >=, ==, !=. And in languages other than
>>> python, things like ->, => (arrows for structure membership), and so on.
>> REXX predates Unicode, I think, or at least its widespread adoption,
>> but it has a non-ASCII operator:
>>
>> http://www.rexswain.com/rexx.html#operators
>>
>> But personally, I've always used backslash. It's nothing to do with
>> ASCII and everything to do with having it on the keyboard. Before you
>> get a language that uses full Unicode, you'll need to have fairly
>> generally available keyboards that have those keys.
>>
>> ChrisA
>
>
> Keyboards with 110,000 keys on them; wonderful. And much larger
> characters on the screen, so that all those can be distinguished. And
> of course all fonts have to support all those characters.
>
> Back to 20 character lines.
>
Somewhat different than this discussion, and I'm not familiar with it myself, but I've read
about the "Space Cadet Keyboard". It's described (among other places) at:
http://catb.org/jargon/html/S/space-cadet-keyboard.html
-=- Larry -=-
OT: This "Jargon File" can be an entertaining read. I found "The Story of Mel" particularly
fascinating.
[toc] | [prev] | [next] | [standalone]
| From | Henrik Faber <hfaber@invalid.net> |
|---|---|
| Date | 2012-07-23 15:24 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <jujja3$dfn$1@speranza.aioe.org> |
| In reply to | #25857 |
On 23.07.2012 14:55, Roy Smith wrote: > In article <500d0632$0$1504$c3e8da3$76491128@news.astraweb.com>, > Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > >> Technically, no, it's a SyntaxError, because the Original Poster has used >> some sort of "Smart Quotes" characters r’‘ instead of good old fashioned >> typewriter-style quotes r'' or r"". >> >> If you're going to ask programming questions using an email client that >> changes what you type, including smart quotes, special hyphens or other >> characters, you're going to have a bad time. > > Some day, we're going to have programming languages that take advantage > of the full unicode character set. Right now, we're working in ASCII > and creating silly digrams/trigrams like r'' for raw strings (and triple-quotes for multi-line > strings). Not to mention <=, >=, ==, !=. And in languages other than > python, things like ->, => (arrows for structure membership), and so on. I disagree. Firstly, Python could already support the different types of strings even with the ASCII character set. For example, the choice could have made to treat the apostophe string 'foo' differently from the double quote string "foo". Then, the backtick could have been used `foo`. Bash for example uses all three and all three have very different meanings. Python is different: explicit is better than implicit, and I'd rather have the "r" the signifies what weird magic is going on instead of having some weird language rules. It would not be different with some UTF-8 "rawstring" magic backticks. Secondly, there's a reason that >=, <= and friends are in use. Every keyboard has a > key and every keyboard has a = key. I don't know any that would have >=, <= or != as UTF-8. It is useful to use only a limited set of characters. And if I think of PHP's latest fiasco that happened with unicode characters, it makes me shudder to think you'd want that stuff in Python. If I remember correctly, it was the Turkish locale that they stuggled with: Turkey apparently does not have a capital "I", so some weird PHP magic code broke with the Turkish locale in effect. Having to keep crap like that in mind is just plain horrible. I'm very happy with the way Python does it. Best regards, Henrik
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-07-23 23:35 +1000 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <mailman.2467.1343050549.4697.python-list@python.org> |
| In reply to | #25863 |
On Mon, Jul 23, 2012 at 11:24 PM, Henrik Faber <hfaber@invalid.net> wrote: > And if I think of PHP's latest fiasco that happened with unicode > characters, it makes me shudder to think you'd want that stuff in > Python. If I remember correctly, it was the Turkish locale that they > stuggled with: Turkey apparently does not have a capital "I", so some > weird PHP magic code broke with the Turkish locale in effect. Having to > keep crap like that in mind is just plain horrible. I'm very happy with > the way Python does it. That said, though, there's good argument in allowing full Unicode in *identifiers*. If I'm allowed to name something "foo", then a German should be allowed to name something "foö". And since identifiers are case sensitive (at least, they are in all good languages...), there should be no issues with not having particular letters. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Henrik Faber <hfaber@invalid.net> |
|---|---|
| Date | 2012-07-23 15:52 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <jujkut$hr3$1@speranza.aioe.org> |
| In reply to | #25865 |
On 23.07.2012 15:35, Chris Angelico wrote: > That said, though, there's good argument in allowing full Unicode in > *identifiers*. If I'm allowed to name something "foo", then a German > should be allowed to name something "foö". And since identifiers are > case sensitive (at least, they are in all good languages...), there > should be no issues with not having particular letters. To you have a "ö" key on your keyboard? I have one. It wouldn't be a problem for me. Most English layouts probably don't. It would be annoying. If you allow for UTF-8 identifiers you'll have to be horribly careful what to include and what to exclude. Is the non-breaking space a valid character for a identifier? Technically it's a different character than the normal space, so why shouldn't it be? What an awesome idea! What about × vs x? Or Ì vs Í vs Î vs Ï vs Ĩ vs Ī vs ī vs Ĭ vs ĭ vs Į vs į vs I vs İ? Do you think if you need to maintain such code you'll immediately know the difference between the 13 (!) different "I"s I just happened to pull out randomly you need to chose and how to get it? What about Ȝ vs ȝ? Or Ȣ vs ȣ? Or ȸ vs ȹ? Or d vs Ԁ vs ԁ vs ԃ vs Ԃ? Or ց vs g? Or ս vs u? I've not even mentioned the different punctuation marks and already it's hell of a mess, although I just happened to look into a few pages. Having UTF-8 in identifiers is a horrible idea. It makes perfect sense to support it within strings (as Python3 does), but I would hate for Python to include them into identifiers. Then again, I'm pretty sure this is not planned anytime soon. Best regards, Henrik
[toc] | [prev] | [next] | [standalone]
| From | Henrik Faber <hfaber@invalid.net> |
|---|---|
| Date | 2012-07-23 15:55 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <jujl4b$hr3$2@speranza.aioe.org> |
| In reply to | #25869 |
On 23.07.2012 15:52, Henrik Faber wrote: > but I would hate for > Python to include them into identifiers. Then again, I'm pretty sure > this is not planned anytime soon. Dear Lord. Python 3.2 (r32:88445, Dec 8 2011, 15:26:58) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> fööbär = 3 >>> fööbär 3 I didn't know this. How awful. Regards, Johannes
[toc] | [prev] | [next] | [standalone]
| From | Henrik Faber <hfaber@invalid.net> |
|---|---|
| Date | 2012-07-23 15:59 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <jujlc7$hr3$3@speranza.aioe.org> |
| In reply to | #25870 |
On 23.07.2012 15:55, Henrik Faber wrote:
> Dear Lord.
>
> Python 3.2 (r32:88445, Dec 8 2011, 15:26:58)
> [GCC 4.5.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> fööbär = 3
>>>> fööbär
> 3
>
> I didn't know this. How awful.
Apparently, not all characters are fine with Python. Why can I not have
domino tiles are identifier characters?
>>> 🀻 = 9
File "<stdin>", line 1
🀻 = 9
^
SyntaxError: invalid character in identifier
I think there needs to be a PEP for that.
Regads,
Henrik
[toc] | [prev] | [next] | [standalone]
| From | Alain Ketterlin <alain@dpt-info.u-strasbg.fr> |
|---|---|
| Date | 2012-07-23 16:08 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <87wr1uy3hw.fsf@dpt-info.u-strasbg.fr> |
| In reply to | #25871 |
Henrik Faber <hfaber@invalid.net> writes: > On 23.07.2012 15:55, Henrik Faber wrote: > >> Dear Lord. >> >> Python 3.2 (r32:88445, Dec 8 2011, 15:26:58) >> [GCC 4.5.2] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> fööbär = 3 >>>>> fööbär >> 3 >> >> I didn't know this. How awful. > > Apparently, not all characters are fine with Python. Why can I not have > domino tiles are identifier characters? The answer is in the language reference: http://docs.python.org/py3k/reference/lexical_analysis.html#identifiers -- Alain.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2012-07-23 15:43 +0100 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <mailman.2476.1343054550.4697.python-list@python.org> |
| In reply to | #25871 |
On 23/07/2012 14:59, Henrik Faber wrote: > On 23.07.2012 15:55, Henrik Faber wrote: > >> Dear Lord. >> >> Python 3.2 (r32:88445, Dec 8 2011, 15:26:58) >> [GCC 4.5.2] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> fööbär = 3 >>>>> fööbär >> 3 >> >> I didn't know this. How awful. > > Apparently, not all characters are fine with Python. Why can I not have > domino tiles are identifier characters? > >>>> 🀻 = 9 > File "<stdin>", line 1 > 🀻 = 9 > ^ > SyntaxError: invalid character in identifier > > I think there needs to be a PEP for that. well get writing then as there's nothing to stop you. > > Regads, > Henrik > -- Cheers. Mark Lawrence.
[toc] | [prev] | [next] | [standalone]
| From | Henrik Faber <hfaber@invalid.net> |
|---|---|
| Date | 2012-07-23 16:43 +0200 |
| Subject | Re: the meaning of rユ.......ï¾ |
| Message-ID | <jujnv8$osp$3@speranza.aioe.org> |
| In reply to | #25879 |
On 23.07.2012 16:43, Mark Lawrence wrote: >> Apparently, not all characters are fine with Python. Why can I not have >> domino tiles are identifier characters? >> >>>>> 🀻 = 9 >> File "<stdin>", line 1 >> 🀻 = 9 >> ^ >> SyntaxError: invalid character in identifier >> >> I think there needs to be a PEP for that. > > well get writing then as there's nothing to stop you. I might wait until April 1st next year with that ;-) Best regards, Henrik
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | comp.lang.python
csiph-web