Re: Unicode and Python - how often do you index strings?

2014-06-06 Thread Johannes Bauer
On 05.06.2014 20:52, Ryan Hiebert wrote: 2014-06-05 13:42 GMT-05:00 Johannes Bauer dfnsonfsdu...@gmx.de: On 05.06.2014 20:16, Paul Rubin wrote: Johannes Bauer dfnsonfsdu...@gmx.de writes: line = line[:-1] Which truncates the trailing \n of a textfile line. use line.rstrip() for that.

Re: Unicode and Python - how often do you index strings?

2014-06-06 Thread Johannes Bauer
On 05.06.2014 22:18, Ian Kelly wrote: Personally I tend toward rstrip('\r\n') so that I don't have to worry about files with alternative line terminators. Hm, I was under the impression that Python already took care of removing the \r at a line ending. Checking that right now: (DOS encoded

Re: Unicode and Python - how often do you index strings?

2014-06-06 Thread Tim Chase
On 2014-06-06 10:47, Johannes Bauer wrote: Personally I tend toward rstrip('\r\n') so that I don't have to worry about files with alternative line terminators. Hm, I was under the impression that Python already took care of removing the \r at a line ending. Checking that right now: (DOS

Re: Unicode and Python - how often do you index strings?

2014-06-06 Thread Steven D'Aprano
On Fri, 06 Jun 2014 10:47:44 +0200, Johannes Bauer wrote: Hm, I was under the impression that Python already took care of removing the \r at a line ending. Checking that right now: [snip example] This is called Universal Newlines. Technically it is a build-time option which applies when you

Re: Unicode and Python - how often do you index strings?

2014-06-06 Thread Grant Edwards
On 2014-06-06, Roy Smith r...@panix.com wrote: Roy is using MT-NewsWatcher as a client. Yes. Except for the fact that it hasn't kept up with unicode, I find the U/I pretty much perfect. I imagine at some point I'll be force to look elsewhere, but then again, netnews is pretty much dead.

Re: Unicode and Python - how often do you index strings?

2014-06-06 Thread Larry Hudson
On 06/06/2014 01:42 AM, Johannes Bauer wrote: snip Ah, I didn't know rstrip() accepted parameters and since you wrote line.rstrip() this would also cut away whitespaces (which sadly are relevant in odd cases). No problem. If a parameter is used in the strip() family, than _only_ those

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Marko Rauhamaa
wxjmfa...@gmail.com: Unicode ? I have the feeling is similar as explaining, i (the imaginary number) is not equal to sqrt(-1). jmf PS Once I gave you a link pointing to unicode.org doc, you obviously did not read it. Sir, you are an artist, a poet even! With admiration, Marko --

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread alister
On Thu, 05 Jun 2014 00:06:54 -0700, wxjmfauth wrote: Le mercredi 4 juin 2014 16:50:59 UTC+2, Michael Torrie a écrit : On 06/04/2014 12:50 AM, wxjmfa...@gmail.com wrote: Like many, you are not understanding unicode because you do not understand the coding of characters. If that is

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Mark H Harris
On 6/5/14 10:39 AM, alister wrote: {snipped all the mess} And you have may time been given a link explaining the problems with posting g=from google groups but deliberately choose to not make your replys readable. The problem is that thing look fine in google groups. What helps is getting

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Johannes Bauer
On 04.06.2014 02:39, Chris Angelico wrote: I know the collective experience of python-list can't fail to bring up a few solid examples here :) Just also grepped lots of code and have surprisingly few instances of index-search. Most are with constant indices. One particular example that comes

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Mark Lawrence
On 05/06/2014 16:57, Mark H Harris wrote: On 6/5/14 10:39 AM, alister wrote: {snipped all the mess} And you have may time been given a link explaining the problems with posting g=from google groups but deliberately choose to not make your replys readable. The problem is that thing look fine

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Joshua Landau
On 4 June 2014 15:50, Michael Torrie torr...@gmail.com wrote: On 06/04/2014 12:50 AM, wxjmfa...@gmail.com wrote: [Things] [Reply to things] Please. Just don't. -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread alister
On Thu, 05 Jun 2014 18:15:31 +0100, Mark Lawrence wrote: The problem is that thing look fine in google groups. What helps is getting to see what the mess looks like from Thunderbird or equivalent. Wrong. 99.99% of people when asked politely take action so there is no problem. The

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Paul Rubin
Johannes Bauer dfnsonfsdu...@gmx.de writes: line = line[:-1] Which truncates the trailing \n of a textfile line. use line.rstrip() for that. -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Johannes Bauer
On 05.06.2014 20:16, Paul Rubin wrote: Johannes Bauer dfnsonfsdu...@gmx.de writes: line = line[:-1] Which truncates the trailing \n of a textfile line. use line.rstrip() for that. rstrip has different functionality than what I'm doing. Cheers, Johannes -- Wo hattest Du das Beben nochmal

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ryan Hiebert
2014-06-05 13:42 GMT-05:00 Johannes Bauer dfnsonfsdu...@gmx.de: On 05.06.2014 20:16, Paul Rubin wrote: Johannes Bauer dfnsonfsdu...@gmx.de writes: line = line[:-1] Which truncates the trailing \n of a textfile line. use line.rstrip() for that. rstrip has different functionality than

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Chris Angelico
On Fri, Jun 6, 2014 at 4:52 AM, Ryan Hiebert r...@ryanhiebert.com wrote: 2014-06-05 13:42 GMT-05:00 Johannes Bauer dfnsonfsdu...@gmx.de: On 05.06.2014 20:16, Paul Rubin wrote: Johannes Bauer dfnsonfsdu...@gmx.de writes: line = line[:-1] Which truncates the trailing \n of a textfile line.

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Paul Rubin
Ryan Hiebert r...@ryanhiebert.com writes: How so? I was using line=line[:-1] for removing the trailing newline, and just replaced it with rstrip('\n'). What are you doing differently? rstrip removes all the newlines off the end, whether there are zero or multiple. In perl the difference is

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ryan Hiebert
On Thu, Jun 5, 2014 at 2:59 PM, Chris Angelico ros...@gmail.com wrote: On Fri, Jun 6, 2014 at 4:52 AM, Ryan Hiebert r...@ryanhiebert.com wrote: 2014-06-05 13:42 GMT-05:00 Johannes Bauer dfnsonfsdu...@gmx.de: On 05.06.2014 20:16, Paul Rubin wrote: Johannes Bauer dfnsonfsdu...@gmx.de

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ian Kelly
On Thu, Jun 5, 2014 at 1:58 PM, Paul Rubin no.email@nospam.invalid wrote: Ryan Hiebert r...@ryanhiebert.com writes: How so? I was using line=line[:-1] for removing the trailing newline, and just replaced it with rstrip('\n'). What are you doing differently? rstrip removes all the newlines off

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Albert-Jan Roskam
- Original Message - From: Ian Kelly ian.g.ke...@gmail.com To: Python python-list@python.org Cc: Sent: Thursday, June 5, 2014 10:18 PM Subject: Re: Unicode and Python - how often do you index strings? On Thu, Jun 5, 2014 at 1:58 PM, Paul Rubin no.email@nospam.invalid wrote

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Roy Smith
In article mailman.10767.1402000635.18130.python-l...@python.org, Albert-Jan Roskam fo...@yahoo.com wrote: - Original Message - From: Ian Kelly ian.g.ke...@gmail.com To: Python python-list@python.org Cc: Sent: Thursday, June 5, 2014 10:18 PM Subject: Re: Unicode

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Rustom Mody
On Friday, June 6, 2014 2:30:26 AM UTC+5:30, Roy Smith wrote: Just for fun, I took a screen-shot of what this looks like in my newsreader. URL below. Looks like something chomped on unicode pretty hard :-) http://www.panix.com/~roy/unicode.pdf Yii --

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ned Deily
In article 8681edf0-7a1f-4110-9f87-a8cd0988c...@googlegroups.com, Rustom Mody rustompm...@gmail.com wrote: On Friday, June 6, 2014 2:30:26 AM UTC+5:30, Roy Smith wrote: Just for fun, I took a screen-shot of what this looks like in my newsreader. URL below. Looks like something chomped on

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ian Kelly
On Thu, Jun 5, 2014 at 2:34 PM, Albert-Jan Roskam fo...@yahoo.com wrote: If you want to be really picky about removing exactly one line terminator, then this captures all the relatively modern variations: re.sub('\r?\n$|\n?\r$', line, '', count=1) or perhaps: re.sub([^ \S]+$, , line) That

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Roy Smith
In article mailman.10781.1402009056.18130.python-l...@python.org, Ned Deily n...@acm.org wrote: In article 8681edf0-7a1f-4110-9f87-a8cd0988c...@googlegroups.com, Rustom Mody rustompm...@gmail.com wrote: On Friday, June 6, 2014 2:30:26 AM UTC+5:30, Roy Smith wrote: Just for fun, I took

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Ned Deily
In article roy-2a9d82.20100705062...@news.panix.com, Roy Smith r...@panix.com wrote: In article mailman.10781.1402009056.18130.python-l...@python.org, Ned Deily n...@acm.org wrote: Roy is using MT-NewsWatcher as a client. Yes. Except for the fact that it hasn't kept up with unicode, I find

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Gregory Ewing
Chris Angelico wrote: On Wed, Jun 4, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: sarcasm style=regex-pedantUm, you mean cent(er|re), don't you? The pattern you wrote also matches centee and centrr./sarcasm Maybe there's someone who spells it that way! Come visit Pirate Island, the

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Mark Lawrence
On 04/06/2014 01:39, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? Python strings can be indexed with integers to

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 6:22 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Single characters quite often, iteration rarely if ever, slicing all the time, but does that last one count? Yes, slicing counts. What matters here is the potential impact of internally representing strings as UTF-8

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Peter Otten
Mark Lawrence wrote: On 04/06/2014 01:39, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? Python strings can be

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Chris Angelico
On Wed, Jun 4, 2014 at 8:10 PM, Peter Otten __pete...@web.de wrote: The indices used for slicing typically don't come out of nowhere. A simple example would be def strip_prefix(text, prefix): if text.startswith(prefix): text = text[len(prefix):] return text If both prefix

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread alister
On Tue, 03 Jun 2014 21:18:12 -0400, Roy Smith wrote: In article mailman.10656.1401842403.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread alister
On Wed, 04 Jun 2014 18:48:29 +1200, Gregory Ewing wrote: Chris Angelico wrote: On Wed, Jun 4, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: sarcasm style=regex-pedantUm, you mean cent(er|re), don't you? The pattern you wrote also matches centee and centrr./sarcasm Maybe there's

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Rustom Mody
On Wednesday, June 4, 2014 4:20:01 PM UTC+5:30, alister wrote: The language is ENGLISH so the correct spelling is Centre regional variations my be common but they are incorrect my? O mee Oo my -- cockney (or Aussie) pedant?? -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread wxjmfauth
Le mercredi 4 juin 2014 02:39:54 UTC+2, Chris Angelico a écrit : A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? Python strings can

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread alister
On Wed, 04 Jun 2014 05:52:24 -0700, Rustom Mody wrote: On Wednesday, June 4, 2014 4:20:01 PM UTC+5:30, alister wrote: The language is ENGLISH so the correct spelling is Centre regional variations my be common but they are incorrect my? O mee Oo my -- cockney (or Aussie) pedant?? I made

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Michael Torrie
On 06/04/2014 12:50 AM, wxjmfa...@gmail.com wrote: Like many, you are not understanding unicode because you do not understand the coding of characters. If that is true, then I'm sure a well-written paragraph or two can set him straight. You continually berate people for not understanding

Re: Unicode and Python - how often do you index strings?

2014-06-04 Thread Dave Angel
Chris Angelico ros...@gmail.com Wrote in message: On Wed, Jun 4, 2014 at 8:10 PM, Peter Otten __pete...@web.de wrote: The indices used for slicing typically don't come out of nowhere. A simple example would be def strip_prefix(text, prefix): if text.startswith(prefix): text =

Re: Unicode and Python

2014-06-04 Thread Rustom Mody
On Wednesday, June 4, 2014 6:09:54 AM UTC+5:30, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? No exactly on-topic for

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Tim Chase
On 2014-06-04 10:39, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? Python strings can be indexed with integers to

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Roy Smith
In article mailman.10656.1401842403.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) sarcasm style=regex-pedantUm, you mean

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Ethan Furman
On 06/03/2014 05:39 PM, Chris Angelico wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the cent[er]{2} of the universe) around one critical question: Is string indexing common? I use it quite a bit, but the strings are

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: In article mailman.10656.1401842403.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: A current discussion regarding Python's Unicode support centres (or centers, depending on how close you are to the

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 11:11 AM, Tim Chase python.l...@tim.thechases.com wrote: I then take row 2 and use it to make a mapping of header-name to a slice-object for slicing the subsequent strings: slice(i.start(), i.end()) print(EmpID = %s % row[header_map[EMPID]].strip())

Re: Unicode and Python - how often do you index strings?

2014-06-03 Thread Tim Chase
On 2014-06-04 12:16, Chris Angelico wrote: On Wed, Jun 4, 2014 at 11:11 AM, Tim Chase python.l...@tim.thechases.com wrote: I then take row 2 and use it to make a mapping of header-name to a slice-object for slicing the subsequent strings: slice(i.start(), i.end())

Re: Unicode in Python

2014-05-08 Thread wxjmfauth
Le jeudi 1 mai 2014 19:21:14 UTC+2, rand...@fastmail.us a écrit : On Mon, Apr 28, 2014, at 4:57, wxjmfa...@gmail.com wrote: Python 3: - It missed the unicode shift. - Covering the whole unicode range will not make Python a unicode compliant product. Please cite exactly what

Re: Unicode in Python

2014-05-03 Thread wxjmfauth
Le vendredi 2 mai 2014 05:50:40 UTC+2, Michael Torrie a écrit : Can't help but feed the troll... forgive me. On 04/28/2014 02:57 AM, wxjmfa...@gmail.com wrote: Python 2.7 + cp1252: - Solid and coherent system (nothing to do with the Euro). Except that cp1252 is not unicode.

Re: Unicode in Python

2014-05-01 Thread random832
On Mon, Apr 28, 2014, at 4:57, wxjmfa...@gmail.com wrote: Python 3: - It missed the unicode shift. - Covering the whole unicode range will not make Python a unicode compliant product. Please cite exactly what portion of the unicode standard requires operations with all characters to be

Re: Unicode in Python

2014-05-01 Thread Michael Torrie
Can't help but feed the troll... forgive me. On 04/28/2014 02:57 AM, wxjmfa...@gmail.com wrote: Python 2.7 + cp1252: - Solid and coherent system (nothing to do with the Euro). Except that cp1252 is not unicode. Perhaps some subset of unicode can be encoded into bytes using cp1252. But if it

Re: Unicode in Python

2014-04-28 Thread wxjmfauth
Le samedi 26 avril 2014 15:38:29 UTC+2, Ian a écrit : On Apr 26, 2014 3:46 AM, Frank Millman fr...@chagford.com wrote: wxjm...@gmail.com wrote in message news:03bb12d8-93be-4ef6-94ae-4a02789ae...@googlegroups.com... == I wrote once 90 % of Python 2 apps (a

Re: Unicode in Python

2014-04-27 Thread wxjmfauth
Le samedi 26 avril 2014 15:38:29 UTC+2, Ian a écrit : On Apr 26, 2014 3:46 AM, Frank Millman fr...@chagford.com wrote: wxjm...@gmail.com wrote in message news:03bb12d8-93be-4ef6-94ae-4a02789ae...@googlegroups.com... == I wrote once 90 % of Python 2 apps (a

Re: Unicode in Python

2014-04-27 Thread Rustom Mody
On Wednesday, April 23, 2014 11:29:13 PM UTC+5:30, Rustom Mody wrote: On Wednesday, April 23, 2014 1:23:00 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 22 Apr 2014 23:57:46 -0700, Rustom Mody wrote: On the other hand when/if a keyboard mapping is defined in which the characters that are

Re: Unicode in Python

2014-04-26 Thread wxjmfauth
== I wrote once 90 % of Python 2 apps (a generic term) supposed to process text, strings are not working. In Python 3, that's 100 %. It is somehow only by chance, apps may give the illusion they are properly working. jmf -- https://mail.python.org/mailman/listinfo/python-list

Re: Unicode in Python

2014-04-26 Thread Frank Millman
wxjmfa...@gmail.com wrote in message news:03bb12d8-93be-4ef6-94ae-4a02789ae...@googlegroups.com... == I wrote once 90 % of Python 2 apps (a generic term) supposed to process text, strings are not working. In Python 3, that's 100 %. It is somehow only by chance, apps may give the

Re: Unicode in Python

2014-04-26 Thread Ben Finney
Frank Millman fr...@chagford.com writes: wxjmfa...@gmail.com wrote […] It is quite frustrating when you make these statements without explaining what you mean by 'not working'. Please do not engage “wxjmfauth” on this topic; he is an amply-demonstrated troll with nothing tangible to back up

Re: Unicode in Python

2014-04-26 Thread Ian Kelly
On Apr 26, 2014 3:46 AM, Frank Millman fr...@chagford.com wrote: wxjmfa...@gmail.com wrote in message news:03bb12d8-93be-4ef6-94ae-4a02789ae...@googlegroups.com... == I wrote once 90 % of Python 2 apps (a generic term) supposed to process text, strings are not working. In

Re: Unicode in Python

2014-04-23 Thread Devin Jeanpierre
On Tue, Apr 22, 2014 at 10:52 PM, Steven D'Aprano st...@pearwood.info wrote: There's not just the keyboard mapping. There's the mental cost of knowing which keyboard mapping you need (is it Greek, Hebrew, or maths symbols?), the cost of remembering the mapping from the keys you see on the

Re: Unicode in Python

2014-04-23 Thread Ben Finney
Devin Jeanpierre jeanpierr...@gmail.com writes: But yes, typing out the special characters is annoying. I just use words. I use words that describe the meaning, where feasible. The only downside to using words is, how do you specify capital versus lowercase letters? Why do you need to, for

Re: Unicode in Python

2014-04-23 Thread Rustom Mody
On Wednesday, April 23, 2014 11:22:33 AM UTC+5:30, Steven D'Aprano wrote: 25 Unicode characters down, 1114000+ to go :-) The question would arise if there was some suggestion to add 1114000(+) characters to the syntactic/lexical definition of python. IOW while its true that unicode is a

Re: Unicode in Python

2014-04-23 Thread Chris Angelico
On Wed, Apr 23, 2014 at 4:57 PM, Rustom Mody rustompm...@gmail.com wrote: In such a (default) setup typing a ∧ or ∨ is not possible at all without something like a char-picker and at best has an ergonomic cost that is an order of magnitude higher than the 'naturally available' characters. On

Re: Unicode in Python

2014-04-23 Thread Steven D'Aprano
On Tue, 22 Apr 2014 23:57:46 -0700, Rustom Mody wrote: perhaps the following is the most preferred? COMPUTE YEAR MODULO 4 EQUALS 0 AND YEAR MODULO 100 NOT EQUAL TO ZERO OR YEAR MODULO 100 EQUAL to 0 IOW COBOL is desirable? If the only choices are COBOL on one hand and the mutant

Re: Unicode in Python

2014-04-23 Thread Steven D'Aprano
On Tue, 22 Apr 2014 23:57:46 -0700, Rustom Mody wrote: On the other hand when/if a keyboard mapping is defined in which the characters that are commonly needed are available, it is reasonable to expect the ∨,∧ to cost no more than 2 strokes each (ie about as much as an 'A'; slightly more than

Re: Unicode in Python

2014-04-23 Thread Rustom Mody
On Wednesday, April 23, 2014 1:23:00 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 22 Apr 2014 23:57:46 -0700, Rustom Mody wrote: On the other hand when/if a keyboard mapping is defined in which the characters that are commonly needed are available, it is reasonable to expect the ∨,∧ to cost

Re: Unicode in Python

2014-04-22 Thread Steven D'Aprano
On Mon, 21 Apr 2014 20:57:39 -0700, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks: http://blog.languager.org/2014/04/unicoded-python.html What you are talking about is not

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 11:14:17 AM UTC+5:30, Terry Reedy wrote: On 4/21/2014 11:57 PM, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

Re: Unicode in Python

2014-04-22 Thread Ian Kelly
On Apr 22, 2014 12:01 AM, Rustom Mody rustompm...@gmail.com wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks: http://blog.languager.org/2014/04/unicoded-python.html I'm reminded of this satire:

Re: Unicode in Python

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 4:18 PM, Rustom Mody rustompm...@gmail.com wrote: Ive reworded it to make it clear that I am referring to the character-sets and not encodings. It's still false, and was in Python 2 as well. The only difference on that front is that, in the absence of an encoding cookie,

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 11:41:56 AM UTC+5:30, Steven D'Aprano wrote: On Mon, 21 Apr 2014 20:57:39 -0700, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

Re: Unicode in Python

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 4:30 PM, Rustom Mody rustompm...@gmail.com wrote: So instead of using λ (0x3bb) we should use 흀 (0x1d740) or something thereabouts like 휆 You still have a major problem: How do you type that? It gives you very little advantage over the word lambda, it introduces

Re: Unicode in Python

2014-04-22 Thread wxjmfauth
Le mardi 22 avril 2014 08:30:45 UTC+2, Rustom Mody a écrit : @ rusy Ive reworded it to make it clear that I am referring to the character-sets and not encodings. Very good, excellent, comment. An healthy coding scheme can only work properly with a unique characters set and the coding is

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 12:01:06 PM UTC+5:30, Ian wrote: On Apr 22, 2014 12:01 AM, Rustom Mody rusto...@gmail.com wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

Re: Unicode in Python

2014-04-22 Thread Steven D'Aprano
On Tue, 22 Apr 2014 02:07:58 -0700, wxjmfauth wrote: Le mardi 22 avril 2014 08:30:45 UTC+2, Rustom Mody a écrit : @ rusy Ive reworded it to make it clear that I am referring to the character-sets and not encodings. Very good, excellent, comment. An healthy coding scheme can only

Re: Unicode in Python

2014-04-22 Thread wxjmfauth
Le mardi 22 avril 2014 14:21:40 UTC+2, Steven D'Aprano a écrit : On Tue, 22 Apr 2014 02:07:58 -0700, wxjmfauth wrote: Le mardi 22 avril 2014 08:30:45 UTC+2, Rustom Mody a écrit : @ rusy Ive reworded it to make it clear that I am referring to the

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 12:01:06 PM UTC+5:30, Ian wrote: On Apr 22, 2014 12:01 AM, Rustom Mody rusto...@gmail.com wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

Re: Unicode in Python

2014-04-22 Thread Chris Angelico
On Wed, Apr 23, 2014 at 3:31 PM, Rustom Mody rustompm...@gmail.com wrote: Chris Angelico wrote: it's impossible for most people to type (and programming with a palette of arbitrary syntactic tokens isn't my idea of fun)... Where's the suggestion to use a palette of arbitrary tokens ? I just

Re: Unicode in Python

2014-04-22 Thread Steven D'Aprano
On Tue, 22 Apr 2014 22:31:41 -0700, Rustom Mody wrote: Chris Angelico wrote: it's impossible for most people to type (and programming with a palette of arbitrary syntactic tokens isn't my idea of fun)... Where's the suggestion to use a palette of arbitrary tokens ? I just tried a greek

Re: Unicode in Python

2014-04-21 Thread Terry Reedy
On 4/21/2014 11:57 PM, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks: http://blog.languager.org/2014/04/unicoded-python.html With python 3 we are at a stage where python programs

Re: unicode, C++, python 2.2

2005-09-11 Thread Martin v. Löwis
Trond Eivind Glomsrød wrote: I am currently writing a python interface to a C++ library. Some of the functions in this library take unicode strings (UTF-8, mostly) as arguments. However, when getting these data I run into problem on python 2.2 (RHEL3) - while the data is all nice UCS4 in

Re: unicode, C++, python 2.2

2005-09-09 Thread jepler
Python comes in two flavors. In one, sys.maxunicode is 65535 and Py_UNICODE is a 16-bit type, and in the other, sys.maxunicode is 1114111 and Py_UNICODE is a 32-bit type. This is selected at compile time, and RedHat has chosen in some versions to compile for sys.maxunicode == 1114111. By using