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
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 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
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):
>>>
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
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.
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 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 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 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-
-
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
--
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
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 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 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
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 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
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
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 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
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 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 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
>>> (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 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
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 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
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 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 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 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 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
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 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
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.
>
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 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
>
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
> &
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
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
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
On 12 juin, 19:57, Benjamin Peterson wrote:
> On behalf of the Python development team, I'm rosy to announce the immediate
> availability of Python 2.7.2.
>
Small error:
The link points to Python 2.7.1.
The 2.7.2 page exists:
http://www.python.org/download/releases/2.7.2/
Update Python 2.7.2 a
>>> '{:+#0{}b}'.format(255, 1 + 2 + 16)
+0b
>>> '{:+#0{}b}'.format(-255, 1 + 2 + 16)
-0b
>>>
>>> eval('{:+#0{}b}'.format(255, 1 + 2 + 16))
255
>>> eval('{:+#0{}b}'.format(-255, 1 + 2 + 16))
-255
>>>
jmf
--
http://mail.python.org/mailman/listinfo/python-list
That seems to me correct.
>>> '\\u{:04x}'.format(ord(u'é'))
\u00e9
>>> '\\U{:08x}'.format(ord(u'é'))
\U00e9
>>>
because
>>> u'\U00e9'
File "", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes
in position 0-5: end of string in escape sequence
>>> u'\U00e9'
é
On 22 juin, 16:07, Saul Spatz wrote:
> Thanks very much. This is the elegant kind of solution I was looking for. I
> had hoped there was a way to do it without even addressing the matter of
> surrogates, but apparently not. The reason I don't like this is that it
> depends on knowing that py
On 24 juin, 09:23, Hegedüs Ervin wrote:
[...]
> Any help would comes well,
>
> thanks:
>
I do not really understand the relation
Python <-> "this will be a book".
For editing purpose, do you need to extract your raw material for
somewhere? to create graphics? to parse files?
or
Are you expec
On 19 juil, 21:09, Terry Reedy wrote:
> On 7/19/2011 2:12 PM, Xah Lee wrote:
>
> >> Also, you may have answered this earlier but I'll ask again anyways: You
> >> ask for the first mismatched pair, Are you referring to the inner most
> >> mismatched, or the outermost? For example, suppose you have
On 20 juil, 09:29, Ian Kelly wrote:
> Otherwise, here's another non-DRY solution:
>
> >>> from itertools import izip
> >>> for i, c in izip(reversed(xrange(len(s))), reversed(s)):
>
> ...
>
> Unfortunately, this is one space where there just doesn't seem to be a
> single obvious way to do it.
We
On 18 août, 22:44, coldpizza wrote:
>
>
> ...
>
> In a web/html environment or in broken ascii-only consoles like the
> one on windows ...
C:\Users\Jean-Michel>echo 'Cet œuf de Lætitia coûte un €uro'
'Cet œuf de Lætitia coûte un €uro'
C:\Users\Jean-Michel>c:\Python27\python
Python 2.7.2 (default
On 19 août, 17:20, Matt Funk wrote:
> Hi,
> thanks for the suggestion. I guess i had found another way around the
> problem as well. But i really wanted to match the line exactly and i
> wanted to know why it doesn't work. That is less for the purpose of
> getting the thing to work but more becaus
On 19 août, 19:33, Matt Funk wrote:
>
> The results obtained are:
> results:
> [(' 2.199000e+01', ' : (instance: 0)\t:\tsome description')]
> so this matches the last number plus the string at the end of the line, but no
> retaining the previous numbers.
>
> Anyway, i think at this point i will go
There is actually a discussion on the dev-list about the replacement
of "re" by "regex".
I'm not a regular expressions specialist, neither a regex user.
However, there is in regex a point that is a little bit disturbing
me.
The regex module proposes a flag to select the "coding" (wrong word,
just
On 28 août, 20:40, MRAB wrote:
> ...
> The regex module tries to be drop-in compatible. It supports the LOCALE
> flag only because the re module has it. Even Perl has something similar.
> ...
Ok. That's quite logical.
jmf
--
http://mail.python.org/mailman/listinfo/python-list
This is just an attempt to put the
http://groups.google.com/group/comp.lang.python/browse_thread/thread/a008af1ac2968833#
discussion at a correct level.
With Python 2.7 a new float number representation (the David Gay's
algorithm)
has been introduced. If this is well honored in Python 2.7, it
seem
On 7 sep, 05:58, casevh wrote:
> ...
>
> Also note that 1.1 * 1.1 is not the same as 1.21.
>
> >>> (1.1 * 1.1).as_integer_ratio()
>
> (5449355549118301, 4503599627370496)>>> (1.21).as_integer_ratio()
>
> (1362338887279575, 1125899906842624)
>
> This doesn't explain why 2.7.2 displayed a differen
On 7 sep, 08:56, Mark Dickinson wrote:
> On Sep 7, 4:58 am, casevh wrote:
>
> > IIRC, Python
> > 3.2 changed (for floats) __str__ to call __repr__.
>
> Yes, exactly: str and repr of a float are identical in Python 3.2 +
>
> I'm also puzzled by the
>
> 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC
Well, Python (as 3.2) has never reached this level of excellence, but
__pycache__, no, not for me.
(I feel better now, after I wrote it.)
--
http://mail.python.org/mailman/listinfo/python-list
On 14 avr, 08:59,
> Fortunately, if you're using a recent Linux or a Mac with MacPorts,
> installing wxPython should never be more than one command line (or half a
> dozen clicks) away. Windows users aren't quite so lucky, but still, it's
> not like installing it is a major hassle.
>
Probably, t
On 16 avr, 05:20, Alec Taylor wrote:
> Good Afternoon,
>
...
Windows user here.
I'm using SciTE, http://www.scintilla.org/SciTE.html . Portable
(run on/from an usb key), output pane, ...
If you are interested in a portable Interactive Interpreter,
http://spinecho.ifrance.com/psi.html (run on/f
On 16 avr, 06:16, harrismh777 wrote:
> By default the sys.path always shows the directory python was opened in,
> usually the users home directory. With .profile you can set the path
> any way you want... most useful for setting up special test directories
> ahead of the "real" code, or for se
On 23 avr, 22:25, Daniel Geržo wrote:
>
> Well I am doing this on:
> Python 2.7.1 (r271:86832, Mar 7 2011, 14:28:09)
> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
>
> So what do you guys advise me to do?
>
> --
Use the io module.
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On 24 avr, 05:10, harrismh777 wrote:
>
> I've been giving this some more thought. From the keyboard, all I am
> able to enter are character strings (not numbers). Presumably these are
> UTF-8 strings in python3. If I enter ...
In Python 3, input() returns a unicode, a sequence/table/array o
On 27 avr, 19:22, Alec Taylor wrote:
> Thanks, any plans for a Windows version?
>
- Download the deb
- Unpack it with a utility like 7zip
- Throw away the unnecessary stuff, (keep the "deditor part")
- Depending on your libs, adatpt the "import"
- Launch deditor.py
- Then ...
[5 minutes]
In fac
On 28 avr, 22:16, Kruptein wrote:
> On 28 apr, 07:46, jmfauth wrote:
>
>
>
> > On 27 avr, 19:22, Alec Taylor wrote:
>
> > > Thanks, any plans for a Windows version?
>
> > - Download the deb
> > - Unpack it with a utility like 7zip
> > - Throw
On 29 avr, 23:01, Kruptein wrote:
> On 29 apr, 20:25, jmfauth wrote:
>
>
>
> > On 28 avr, 22:16, Kruptein wrote:
>
> > > On 28 apr, 07:46, jmfauth wrote:
>
> > > > On 27 avr, 19:22, Alec Taylor wrote:
>
> > > > > Thanks
On 12 mai, 18:17, Ian Kelly wrote:
> ...
> to worry about encodings are when you're encoding unicode characters
> to byte strings, or decoding bytes to unicode characters
A small but important correction/clarification:
In Unicode, "unicode" does not encode a *character*. It
encodes a *code poi
On 14 mai, 09:41, harrismh777 wrote:
> ...
> I'm getting much closer here,
> ...
You should really understand, that Unicode is a domain per
se. It is independent from any os's, programming languages
or applications. It is up to these tools to be "unicode"
compliant.
Working in a full unicode mo
On 30 mai, 13:09, hackingKK wrote:
[...]
>
> Even better, try convincing them to use Ubuntu instead of a virus
> called Where I Never Do Operations With Safety, or WINDOWS for short.
> That way Python will come by default and VB will be out of question
> Happy hacking.
> Krishnakant.
Do you m
On 12 sep, 10:17, Gary Herron wrote:
> On 09/12/2011 12:49 AM, Alec Taylor wrote:
>
>
>
> > Good evening,
>
> > I have converted ODT to HTML using LibreOffice Writer, because I want
> > to convert from HTML to Creole using python-creole. Unfortunately I
> > get this error: "File "Convert to Creole
On 12 sep, 10:49, Steven D'Aprano wrote:
>
> Even with a source code encoding, you will probably have problems with
> source files including \xe2 and other "bad" chars. Unless they happen to
> fall inside a quoted string literal, I would expect to get a SyntaxError.
>
This is absurd and a complet
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
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 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 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 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
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 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
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 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 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 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
>
> 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 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
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 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 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 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, 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.
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 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]
>
>
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 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 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
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
--
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
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
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
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, 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
1 - 100 of 155 matches
Mail list logo