--
UTF-8, Unicode (consortium): 1 to 4 *Unicode Transformation Unit*
UTF-8, ISO 10646: 1 to 6 *Unicode Transformation Unit*
(still actual, unless tealy freshly modified)
jmf
--
http://mail.python.org/mailman/listinfo/python-list
-
A coding scheme works with three sets. A *unique* set
of CHARACTERS, a *unique* set of CODE POINTS and a *unique*
set of ENCODED CODE POINTS, unicode or not.
The relation between the set of characters and the set of the
code points is a *human* table, created with a sheet of paper
and a pe
On 5 juin, 19:43, Νικόλαος Κούρας wrote:
> Ôç ÔåôÜñôç, 5 Éïõíßïõ 2013 8:56:36 ð.ì. UTC+3, ï ÷ñÞóôçò Steven D'Aprano
> Ýãñáøå:
>
> Somehow, I don't know how because I didn't see it happen, you have one or
> more files in that directory where the file name as bytes is invalid when
> decoded as UTF-
On 2 juin, 20:09, Rick Johnson wrote:
> >
> >
>
> I never purposely inject ANY superfluous cycles in my code except in
> the case of testing or development. To me it's about professionalism.
> Let's consider a thought exercise shall we?
>
The flexible string representation is the per
On 31 mai, 00:19, alcyon wrote:
> On Wednesday, May 29, 2013 3:19:42 PM UTC-7, Cameron Simpson wrote:
> > On 29May2013 13:14, Ian Kelly wrote:
>
> > | On Wed, May 29, 2013 at 12:33 PM, alcyon wrote:
>
> > | > This notation displays hex values except when they are 'printable', in
> > which case
On 30 mai, 20:42, Ian Kelly wrote:
> On Thu, May 30, 2013 at 12:26 PM, Mok-Kong Shen
>
> wrote:
> > Am 27.05.2013 17:30, schrieb Ned Batchelder:
>
> >> On 5/27/2013 10:45 AM, Mok-Kong Shen wrote:
>
> >>> From an int one can use to_bytes to get its individual bytes,
> >>> but how can one reconstru
On 20 mai, 19:56, Christian Gollwitzer wrote:
> Oops, I thought we were posting to comp.dsp. Nevertheless, I think
> numpy.fft does mixed-radix (can't check it now)
>
> Am 20.05.13 19:50, schrieb Christian Gollwitzer:
>
>
>
>
>
>
>
> > Am 20.
Non sense.
The discrete fft algorithm is valid only if the number of data
points you transform does correspond to a power of 2 (2**n).
Keywords to the problem: apodization, zero filling, convolution
product, ...
eg. http://en.wikipedia.org/wiki/Convolution
jmf
--
http://mail.python.org/mailma
The handling of diacriticals is especially a nice case
study. One can use it to toy with some specific features of
Unicode, normalisation, decomposition, ...
... and also to show how Unicode can be badly implemented.
First and quick example that came to my mind (Py325 and Py332):
>>>
On 14 mai, 17:05, Christian Jurk wrote:
> Hi folks,
>
> This questions may be asked several times already, but the development of
> relevant software continues day-for-day. For some time now I've been using
> xhtml2pdf [1] to generate PDF documents from HTML templates (which are
> rendered thro
On 8 mai, 15:19, Roy Smith wrote:
> Apropos to any of the myriad unicode threads that have been going on
> recently:
>
> http://xkcd.com/1209/
--
This reflects a lack of understanding of Unicode.
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 6 mai, 09:49, Fábio Santos wrote:
> On 6 May 2013 08:34, "Chris Angelico" wrote:
>
> > Well you see, it was 70 bytes back in the Python 2 days (I'll defer to
> > Steven for data points earlier than that), but with Python 3, there
> > were two versions: one was 140 bytes representing 70 charact
In a previous post,
http://groups.google.com/group/comp.lang.python/browse_thread/thread/6aec70817705c226#
,
Chris “Kwpolska” Warrick wrote:
“Is Unicode support so hard, especially in the 21st century?”
--
Unicode is not really complicate and it works very well (more
than two decades of develo
On 9 avr, 15:32, thomasancill...@gmail.com wrote:
> I'm new to learning python and creating a basic program to convert units of
> measurement which I will eventually expand upon but im trying to figure out
> how to loop the entire program. When I insert a while loop it only loops the
> first 2 l
On 4 avr, 03:36, Steven D'Aprano wrote:
> Although PEP 8 is only compulsory for the Python standard library, many
> users like to stick to PEP 8 for external projects.
>
> http://www.python.org/dev/peps/pep-0008/
>
> With perhaps one glaring exception: many people hate, or ignore, PEP 8's
> recomm
This FSR is wrong by design. A naive way to embrace Unicode.
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 2 avr, 18:57, rusi wrote:
> On Apr 2, 8:17 pm, Ethan Furman wrote:
>
> > Simmons (too many Steves!), I know you're new so don't have all the history
> > with jmf that many
> > of us do, but consider that the original post was about numbers, had
> > nothing to do with
> > characters or unicod
On 2 avr, 16:03, Steven D'Aprano wrote:
> On Tue, 02 Apr 2013 11:58:11 +0100, Steve Simmons wrote:
>
> I'm sure you didn't intend to be insulting, but some of us *have* taken
> JMF seriously, at least at first. His repeated overblown claims of how
> Python is destroying Unicode ...
Sorrry I neve
On 2 avr, 10:03, Chris Angelico wrote:
> On Tue, Apr 2, 2013 at 6:24 PM, jmfauth wrote:
> > An editor may reflect very well the example a gave. You enter
> > thousand ascii chars, then - boum - as you enter a non ascii
> > char, your editor (assuming is uses a mechanism like
On 2 avr, 10:35, Steven D'Aprano wrote:
> On Tue, 02 Apr 2013 19:03:17 +1100, Chris Angelico wrote:
>
> So what? Who cares if it takes 0.2 second to insert a character
> instead of 0.1 second? That's still a hundred times faster than you
> can type.
>
-
This not the problem. The i
On 2 avr, 01:43, Neil Hodgson wrote:
> Mark Lawrence:
>
> > You've given many examples of the same type of micro benchmark, not many
> > examples of different types of benchmark.
>
> Trying to work out what jmfauth is on about I found what appears to
>
On 1 avr, 21:28, Chris Angelico wrote:
> On Tue, Apr 2, 2013 at 6:15 AM, jmfauth wrote:
> > Py32
> >>>> import timeit
> >>>> timeit.repeat("'a' * 1000 + 'ẞ'")
> > [0.7005365263669056, 0.6810694766790423, 0.6811978
-
I'm not whining or and I'm not complaining (and never did).
I always exposed facts.
I'm not especially interested in Python, I'm interested in
Unicode.
Usualy when I posted examples, there are confirmed.
What I see is this (std "download-abled" Python's on Windows 7 (and
other
Windo
--
Neil Hodgson:
"The counter-problem is that a French document that needs to include
one mathematical symbol (or emoji) outside Latin-1 will double in size
as a Python string."
Serious developers/typographers/users know that you can not compose
a text in French with "latin-1". This is now a
On 28 mar, 22:11, jmfauth wrote:
> On 28 mar, 21:29, Benjamin Kaplan wrote:
>
>
>
>
>
>
>
>
>
> > On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote:
> > > On 28 mar, 17:33, Ian Kelly wrote:
> > >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth
On 28 mar, 21:29, Benjamin Kaplan wrote:
> On Thu, Mar 28, 2013 at 10:48 AM, jmfauth wrote:
> > On 28 mar, 17:33, Ian Kelly wrote:
> >> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote:
> >> > The flexible string representation takes the problem from the
> >
On 28 mar, 18:55, Chris Angelico wrote:
> On Fri, Mar 29, 2013 at 4:48 AM, jmfauth wrote:
> > If Python had imlemented Unicode correctly, there would
> > be no difference in using an "a", "é", "€" or any character,
> > what the narrow builds did
On 28 mar, 17:33, Ian Kelly wrote:
> On Thu, Mar 28, 2013 at 7:34 AM, jmfauth wrote:
> > The flexible string representation takes the problem from the
> > other side, it attempts to work with the characters by using
> > their representations and it (can only) fails...
>
&
Chris,
Your problem with int/long, the start of this thread, is
very intersting.
This is not a demonstration, a proof, rather an illustration.
Assume you have a set of integers {0...9} and an operator,
let say, the addition.
Idea.
Just devide this set in two chunks, {0...4} and {5...9}
and work
On 28 mar, 16:14, jmfauth wrote:
> On 28 mar, 15:38, Chris Angelico wrote:
>
>
>
>
>
>
>
>
>
> > On Fri, Mar 29, 2013 at 1:12 AM, jmfauth wrote:
> > > This flexible string representation is so absurd that not only
> > > "it" does
On 28 mar, 15:38, Chris Angelico wrote:
> On Fri, Mar 29, 2013 at 1:12 AM, jmfauth wrote:
> > This flexible string representation is so absurd that not only
> > "it" does not know you can not write Western European Languages
> > with latin-1, "it" pen
On 28 mar, 14:01, Steven D'Aprano wrote:
> On Thu, 28 Mar 2013 23:11:55 +1100, Neil Hodgson wrote:
> > Ian Foote:
>
>
> > One benefit of
> > UTF-8 over Python's flexible representation is that it is, on average,
> > more compact over a wide set of samples.
>
> Sure. And over a different set of sam
On 28 mar, 11:30, Chris Angelico wrote:
> On Thu, Mar 28, 2013 at 8:03 PM, jmfauth wrote:
-
> You really REALLY need to sort out in your head the difference between
> correctness and performance. I still haven't seen one single piece of
> evidence from you that Python
On 28 mar, 07:12, Ethan Furman wrote:
> On 03/27/2013 08:49 PM, rusi wrote:
>
> > In particular "You are a liar" is as bad as "You are an idiot"
> > The same statement can be made non-abusively thus: "... is not true
> > because ..."
>
> I don't agree. With all the posts and micro benchmarks and
On 26 mar, 22:08, Grant Edwards wrote:
>
> I think we all agree that jmf is a character.
>
--
The characters are also "intrisic characteristics" of a
group in the Group Theory.
If you are not a mathematician, but eg a scientist in
need of these characters, they are available in
"precalculat
On 26 mar, 20:03, Chris Angelico wrote:
> On Wed, Mar 27, 2013 at 5:50 AM, jmfauth wrote:
> > On 25 mar, 22:51, Chris Angelico wrote:
> >> The Python 3 merge of int and long has effectively penalized
> >> small-number arithmetic by removing an optimization. As w
On 25 mar, 22:51, Chris Angelico wrote:
> The Python 3 merge of int and long has effectively penalized
> small-number arithmetic by removing an optimization. As we've seen
> from PEP 393 strings (jmf aside), there can be huge benefits from
> having a single type with multiple representations inter
On 23 mar, 17:17, Mark Lawrence wrote:
> On 23/03/2013 09:24, jmfauth wrote:
>
>
>
>
>
>
>
>
>
> > On 20 mar, 22:02, Tim Delaney wrote:
> >> On 21 March 2013 06:40, jmfauth wrote:
>
> >>>
> >>> [snip usual rant from
On 21 mar, 04:12, rusi wrote:
> On Mar 21, 12:40 am, jmfauth wrote:
>
> >
>
> > Courageous people can try to do something with the unicode
> > collation algorithm (see unicode.org). Some time ago, for the fun,
> > I wrote something (not perfec
On 20 mar, 22:02, Tim Delaney wrote:
> On 21 March 2013 06:40, jmfauth wrote:
>
> >
> > [snip usual rant from jmf]
>
>
> It has been acknowledged as a real regression, but he keeps hijacking every
> thread where strings are mentioned to harp on about it. He
On 20 mar, 11:29, jmfauth wrote:
> On 20 mar, 10:30, Phil Thompson wrote:
-
>
>
> Strangely, I had not problem (if I recall correctly) with a
> very basic application (QMainWindow + QLineEdit).
ADDENDUM, CORRECTION
It fails too. I forgot to rename PySide --> PyQt4 !
On 20 mar, 11:38, Phil Thompson wrote:
> On Wed, 20 Mar 2013 03:29:35 -0700 (PDT), jmfauth
> wrote:
>
>
>
>
>
>
>
>
>
> > On 20 mar, 10:30, Phil Thompson wrote:
> >> On Wed, 20 Mar 2013 02:09:06 -0700 (PDT), jmfauth
> >> wrote:
>
&g
Courageous people can try to do something with the unicode
collation algorithm (see unicode.org). Some time ago, for the fun,
I wrote something (not perfect) with a reduced keys table (see
unicode.org), only a keys subset for some scripts hold in memory.
It works with Py32 and Py33. In an at
On 20 mar, 10:30, Phil Thompson wrote:
> On Wed, 20 Mar 2013 02:09:06 -0700 (PDT), jmfauth
> wrote:
>
>
>
>
>
>
>
>
>
> > On 20 mar, 01:12, "D. Xenakis" wrote:
> >> Hi there,
> >> Im searching for an installation guide for PyQt
On 20 mar, 01:12, "D. Xenakis" wrote:
> Hi there,
> Im searching for an installation guide for PyQt toolkit.
> To be honest im very confused about what steps should i follow for a complete
> and clean installation. Should i better choose to install the 32bit or the
> 64bit windows version? Or ma
--
utf-32 is already here. You are all most probably [*]
using it without noticing it. How? By using OpenType fonts,
without counting the text processing applications using them.
Why? Because there is no other way to do it.
[*] depending of the font, the internal table(s), eg "cmap" table,
ar
As a reply to rusi's comment:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/a7689b158fdca29e#
>From string creation to the itertools usage. A medley. Some timings.
Important:
The real/absolute values of these experiments are not important. I do
not care and I'm not complain
On 11 mar, 03:06, Terry Reedy wrote:
>
> ...
> By teaching 'speed before correctness", this site promotes bad
> programming habits and thinking (and the use of low-level but faster
> languages).
> ...
This is exactly what "your" flexible string representation
does!
And away from technical aspe
On 6 mar, 15:03, Roy Smith wrote:
> In article ,
>
> fa...@squashclub.org wrote:
> > Instead of:
>
> > 1.8e-04
>
> > I need:
>
> > 1.8e-004
>
> > So two zeros before the 4, instead of the default 1.
>
> Just out of curiosity, what's the use case here?
--
>>> from vecmat6 import *
>>> from s
On 27 fév, 23:24, Terry Reedy wrote:
> On 2/27/2013 3:21 AM, jmfauth hijacked yet another thread:
> > Some are building, some are destroying.
>
> We are still waiting for you to help build a better 3.3+, instead of
> trying to 'destroy' it with mostly irrelev
On 27 fév, 09:21, jmfauth wrote:
>
>
> Fascinating software.
> Some are building, some are destroying.
>
> Py33>>> timeit.repeat("{1:'abc需'}")
>
> [0.2573893570572636, 0.24261832285651508, 0.24259548003601594]
>
>
Fascinating software.
Some are building, some are destroying.
Py33
>>> timeit.repeat("{1:'abc需'}")
[0.2573893570572636, 0.24261832285651508, 0.24259548003601594]
Py323
timeit.repeat("{1:'abc需'}")
[0.11000708521282831, 0.0994753634273593, 0.09901023634051853]
jmf
--
http://mail.py
On 23 fév, 15:26, Devin Jeanpierre wrote:
> Hi folks,
>
> I'm pretty unsure of myself when it comes to unicode. As I understand
> it, you're generally supposed to compare things in a case insensitive
> manner by case folding, right? So instead of a.lower() == b.lower()
> (the ASCII way), you do a.
On 23 fév, 20:08, Ethan Furman wrote:
> On 02/23/2013 10:44 AM, jmfauth wrote:
>
> [snip various stupidities]
>
> > jmf
>
> Peter, jmfauth is one of our resident trolls. Feel free to ignore him.
>
> --
> ~Ethan~
Sorry, what can say?
More memory and slow down!
If
On 23 fév, 16:43, Steve Simmons wrote:
> On 22/02/2013 22:37, piterrr.dolin...@gmail.com wrote:> So far I am getting
> the impression
...
>
> My main message to you would be : don't approach Python with a negative
> attitude, give it a chance and I'm sure you'll come to enjoy it.
>
Until
On 13 fév, 21:24, 8 Dihedral wrote:
> Rick Johnson於 2013年2月14日星期四UTC+8上午12時34分11秒寫道:
>
>
>
>
>
>
>
> > On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
>
> > > >>> d = {ord('a'): 'A', ord('b'
On 13 fév, 06:26, Rick Johnson wrote:
> On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote:
> >
> > REFERENCES:
> >
> > [1]: Should string.replace handle list
On 7 fév, 04:04, Steven D'Aprano wrote:
> On Wed, 06 Feb 2013 13:55:58 -0800, Demian Brecht wrote:
> > Well, an alternative /could/ be:
>
> ...
> py> s = 'http://alongnameofasite1234567.com/q?sports=run&a=1&b=1'
> py> assert u2f(s) == mangle(s)
> py>
> py> from timeit import Timer
> py> setup = 'f
Mea culpa. I had not my head on my shoulders.
Inputing if working fine, it returns "text" correctly.
However, and this is something different, I'm a little
bit surprised, input() does not handle escaped characters
(\u, \U).
Workaround: encode() and decode() as "raw-unicode-escape".
jmf
--
http:/
On Jun 20, 11:22 am, Christian Heimes wrote:
> Am 18.06.2012 20:45, schrieb Terry Reedy:
>
> > The simultaneous reintroduction of 'ur', but with a different meaning
> > than in 2.7, *was* a problem and it should be removed in the next release.
>
> FYI:http://hg.python.org/cpython/rev/8e47e9af826e
On Jun 20, 1:21 am, Steven D'Aprano wrote:
> On Mon, 18 Jun 2012 07:00:01 -0700, jmfauth wrote:
> > On 18 juin, 12:11, Steven D'Aprano > +comp.lang.pyt...@pearwood.info> wrote:
> >> On Mon, 18 Jun 2012 02:30:50 -0700, jmfauth wrote:
> >> > On 18 juin
On Jun 19, 9:54 pm, "Edward C. Jones" wrote:
> On 06/19/2012 12:41 PM, Hemanth H.M wrote:
>
> > >>> float.hex(x)
> > '0x1.5p+3'
>
> Some days I don't ask the brightest questions. Suppose x was a numpy
> floating scalar (types numpy.float16, numpy.float32, numpy.float64, or
> numpy.flo
On Jun 18, 8:45 pm, Terry Reedy wrote:
> On 6/18/2012 12:39 PM, jmfauth wrote:
>
> > We are turning in circles.
>
> You are, not we. Please stop.
>
> > You are somehow legitimating the reintroduction of unicode
> > literals
>
> We are not 'reintrod
We are turning in circles. You are somehow
legitimating the reintroduction of unicode
literals and I shew, not to say proofed, it may
be a source of problems.
Typical Python desease. Introduce a problem,
then discuss how to solve it, but surely and
definitivly do not remove that problem.
As far a
Thinks are very clear to me. I wrote enough interactive
interpreters with all available toolkits for Windows
since I know Python (v. 1.5.6).
I do not see why the semantic may vary differently
in code source or in an interactive interpreter,
esp. if Python allow it!
If you have to know by advance
On 18 juin, 12:11, Steven D'Aprano wrote:
> On Mon, 18 Jun 2012 02:30:50 -0700, jmfauth wrote:
> > On 18 juin, 10:28, Benjamin Kaplan wrote:
> >> The u prefix is only there to
> >> make it easier to port a codebase from Python 2 to Python 3. It doesn't
> &
On 18 juin, 10:28, Benjamin Kaplan wrote:
> On Mon, Jun 18, 2012 at 1:19 AM, jmfauth wrote:
> > What is input() supposed to return?
>
> >>>> u'a' == 'a'
> > True
>
> >>>> r1 = input(':')
> > :a
>
What is input() supposed to return?
>>> u'a' == 'a'
True
>>>
>>> r1 = input(':')
:a
>>> r2 = input(':')
:u'a'
>>> r1 == r2
False
>>> type(r1), len(r1)
(, 1)
>>> type(r2), len(r2)
(, 4)
>>>
---
sys.argv?
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 17 juin, 15:48, Christian Heimes wrote:
> Am 17.06.2012 14:11, schrieb jmfauth:
>
> > I noticed this at the 3.3.0a0 realease.
>
> > The main motivation for this came from this:
> >http://bugs.python.org/issue13748
>
> > PS I saw the dev-list message.
>
On 17 juin, 13:30, Christian Heimes wrote:
> Am 16.06.2012 19:36, schrieb jmfauth:
>
> > Please consistency.
>
> Python 3.3 supports the ur"" syntax just as Python 2.x:
>
> $ ./python
> Python 3.3.0a4+ (default:4c704dc97496, Jun 16 2012, 00:06:09)
> [GCC 4
Please consistency.
>>> sys.version
'3.3.0a4 (v3.3.0a4:7c51388a3aa7+, May 31 2012, 20:15:21) [MSC v.1600
32 bit (Intel)]'
>>> 'a'
'a'
>>> b'a'
b'a'
>>> br'a'
b'a'
>>> rb'a'
b'a'
>>> u'a'
'a'
>>> ur'a'
'a'
>>> ru'a'
SyntaxError: invalid syntax
>>>
jmf
--
http://mail.python.org/mailman/listinfo/py
On 30 mai, 08:52, "ru...@yahoo.com" wrote:
> In python2, "\u" escapes are processed in raw unicode
> strings. That is, ur'\u3000' is a string of length 1
> consisting of the IDEOGRAPHIC SPACE unicode character.
>
> In python3, "\u" escapes are not processed in raw strings.
> r'\u3000' is a string
On 30 mai, 13:54, Thomas Rachel wrote:
> Am 30.05.2012 08:52 schrieb ru...@yahoo.com:
>
>
>
> > This breaks a lot of my code because in python 2
> > re.split (ur'[\u3000]', u'A\u3000A') ==> [u'A', u'A']
> > but in python 3 (the result of running 2to3),
> > re.split (r'[\u3000]', 'A\
On 18 mai, 17:08, Marco Buttu wrote:
> On 05/17/2012 09:32 PM, Marco wrote:
>
> > Is it normal the str.isnumeric() returns False for these Cuneiforms?
>
> > '\U00012456'
> > '\U00012457'
> > '\U00012432'
> > '\U00012433'
>
> > They are all in the Nl category.
>
> > Marco
>
> It's ok, I found that
On 18 mai, 17:08, Marco Buttu wrote:
> On 05/17/2012 09:32 PM, Marco wrote:
>
> > Is it normal the str.isnumeric() returns False for these Cuneiforms?
>
> > '\U00012456'
> > '\U00012457'
> > '\U00012432'
> > '\U00012433'
>
> > They are all in the Nl category.
>
> > Marco
>
> It's ok, I found that
On 17 mai, 21:32, Marco wrote:
> Is it normal the str.isnumeric() returns False for these Cuneiforms?
>
> '\U00012456'
> '\U00012457'
> '\U00012432'
> '\U00012433'
>
> They are all in the Nl category.
Indeed there are, but Unicode (ver. 5.0.0) does not assign numeric
values to these code points.
On 16 mai, 17:48, Marco wrote:
> Hi all, because
>
> "There should be one-- and preferably only one --obvious way to do it",
>
> there should be a difference between the two methods in the subject, but
> I can't find it:
>
> >>> '123'.isdecimal(), '123'.isdigit()
> (True, True)
> >>> print('\u06
On 29 fév, 14:45, jmfauth wrote:
> For those who do not know:
> The u'' string literal trick has never worked in Python 2.
>
> >>> sys.version
>
> '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]'>>> print
> u'Un
For those who do not know:
The u'' string literal trick has never worked in Python 2.
>>> sys.version
'2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]'
>>> print u'Un oeuf à zéro EURO uro'
Un uf à zéro uro
>>>
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 25 fév, 23:51, Steven D'Aprano wrote:
> On Sat, 25 Feb 2012 13:25:37 -0800, jmfauth wrote:
> >>>> (2.0).hex()
> > '0x1.0p+1'
> >>>> (4.0).hex()
> > '0x1.0p+2'
> >>>> (1.5).hex
>>> (2.0).hex()
'0x1.0p+1'
>>> (4.0).hex()
'0x1.0p+2'
>>> (1.5).hex()
'0x1.8p+0'
>>> (1.1).hex()
'0x1.1999ap+0'
>>>
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 23 fév, 15:06, Steven D'Aprano wrote:
> Following instructions here:
>
> http://docs.python.org/py3k/distutils/builtdist.html#creating-windows...
>
> I am trying to create a Windows installer for a pure-module distribution
> using Python 3.2. I get a "LookupError: unknown encoding: mbcs"
>
> He
On 17 fév, 11:03, Daniel Fetchinson wrote:
> >> Hi folks, often times in science one expresses a value (say
> >> 1.03789291) and its error (say 0.00089) in a short way by parentheses
> >> like so: 1.0379(9)
>
> > Before swallowing any Python solution, you should
> > realize, the values (value, err
On 16 fév, 01:18, Daniel Fetchinson wrote:
> Hi folks, often times in science one expresses a value (say
> 1.03789291) and its error (say 0.00089) in a short way by parentheses
> like so: 1.0379(9)
>
Before swallowing any Python solution, you should
realize, the values (value, error) you are usin
On 13 fév, 04:09, Terry Reedy wrote:
>
>
> * The new internal unicode scheme for 3.3 is pretty much a mixture of
> the 3 storage formats (I am of course, skipping some details) by using
> the widest one needed for each string. The advantage is avoiding
> problems with each of the three. The disadv
There is so much to say on the subject, I do not know
where to start. Some points.
Today, Sunday, 12 February 2012, 90%, if not more, of the
Python applications supposed to work with text and I'm toying
with are simply not working. Two reasons:
1) Most of the devs understand nothing or not enoug
On 2 fév, 11:03, Andrea Crotti wrote:
> On 02/02/2012 12:51 AM, Steven D'Aprano wrote:
>
>
>
> > On Wed, 01 Feb 2012 17:47:22 +, Andrea Crotti wrote:
>
> >> Yes they are exactly the same, because in that file I just write exactly
> >> the same list,
> >> but when modifying it at run-time it do
On 1 fév, 17:15, Andrea Crotti wrote:
> So suppose I want to modify the sys.path on the fly before running some code
> which imports from one of the modules added.
>
> at run time I do
> sys.path.extend(paths_to_add)
>
> but it still doesn't work and I get an import error.
>
> If I take these path
>
> In short: if you need to write "system" scripts on Unix, and you need them
> to work reliably, you need to stick with Python 2.x.
I think, understanding the coding of the characters helps a bit.
I can not figure out how the example below could not be
done on other systems.
D:\tmp>chcp
Page
On 13 jan, 20:04, Ethan Furman wrote:
> With NaN, it is possible to get a list that will not properly sort:
>
> --> NaN = float('nan')
> --> spam = [1, 2, NaN, 3, NaN, 4, 5, 7, NaN]
> --> sorted(spam)
> [1, 2, nan, 3, nan, 4, 5, 7, nan]
>
> I'm constructing a Null object with the semantics that if
On 11 jan, 01:56, Terry Reedy wrote:
> On 1/10/2012 8:43 AM, jmfauth wrote:
>
> ...
>
> mbcs encodes according to the current codepage. Only the chinese
> codepage(s) can encode the chinese char. So the unicode error is correct
> and 2.7 has a bug in that it is doing "
On 11 jan, 01:56, Terry Reedy wrote:
> On 1/10/2012 8:43 AM, jmfauth wrote:
>
>
>
> > D:\>c:\python32\python.exe
> > Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit
> > (Intel)] on win
> > 32
> > Type "help", &
On 10 jan, 13:28, jmfauth wrote:
Addendum, Python console ("dos box")
D:\>c:\python32\python.exe
Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more inf
On 10 jan, 11:53, 8 Dihedral wrote:
> Terry Reedy於 2012年1月10日星期二UTC+8下午4時08分40秒寫道:
>
>
> > I get the same error running 3.2.2 under IDLE but not when pasting into
> > Command Prompt. However, Command Prompt may be cheating by replacing the
> > Chinese chars with '??' upon pasting, so that Pyth
1) If I copy/paste these CJK chars from Google Groups in two of my
interactive
interpreters (no "dos/cmd console"), I have no problem.
>>> import unicodedata as ud
>>> ud.name('工')
'CJK UNIFIED IDEOGRAPH-5DE5'
>>> ud.name('具')
'CJK UNIFIED IDEOGRAPH-5177'
>>> hex(ord(('工')))
'0x5de5'
>>> hex(ord('
On 6 jan, 11:03, Ivan wrote:
> Dear All
>
> I'm developing a python application for which I need to support a
> non-standard character encoding (specifically ISO 6937/2-1983, Addendum
> 1-1989). Here are some of the properties of the encoding and its use in
> the application:
>
> - I need to r
On 3 déc, 04:54, Antti J Ylikoski wrote:
> Helsinki, Finland, the EU <<<
>>> sys.version
'2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]'
>>> 'éléphant'
'\xe9l\xe9phant'
>>>
>>> sys.version
'3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)]'
>>>
On 6 oct, 06:39, Greg wrote:
> Brilliant! It worked. Thanks!
>
> Here is the final code for those who are struggling with similar
> problems:
>
> ## open and decode file
> # In this case, the encoding comes from the charset argument in a meta
> tag
> # e.g.
> fileObj = open(filePath,"r").read()
>
On 13 sep, 10:15, Steven D'Aprano wrote:
The intrinsic coding of the characters is one thing,
The usage of bytes stream supposed to represent a text
is one another thing,
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 12 sep, 23:39, "Rhodri James" wrote:
> Now read what Steven wrote again. The issue is that the program contains
> characters that are syntactically illegal. The "engine" can be perfectly
> correctly translating a character as a smart quote or a non breaking space
> or an e-umlaut or w
1 - 100 of 155 matches
Mail list logo