On Mon, Mar 9, 2015 at 5:34 PM, Steven D'Aprano
wrote:
> Chris Angelico wrote:
>
>> As to the notion of rejecting the construction of strings containing
>> these invalid codepoints, I'm not sure. Are there any languages out
>> there that have a Unicode string type that requires that all
>> codepoi
Chris Angelico wrote:
> As to the notion of rejecting the construction of strings containing
> these invalid codepoints, I'm not sure. Are there any languages out
> there that have a Unicode string type that requires that all
> codepoints be valid (no surrogates, no U+FFFE, etc)?
U+FFFE and U+FFF
Ben Finney :
> Steven D'Aprano writes:
>
>> '\udd00' should be a SyntaxError.
>
> I find your argument convincing, that attempting to construct a
> Unicode string of a lone surrogate should be an error.
Then we're back to square one:
>>> b'\x80'.decode('utf-8', errors='surrogateescape')
'
Jason;
Thank you for your response. I’m just starting out with Python and the
tutorials I have done are on 2.7.9. I will looking on to python3. It is
preloaded on Mac :-).
Jason
___
jv92...@gmail.com
619-227-0927
> On Mar 6, 2015, at 9:37 PM, Jason Friedman w
On Sun, Mar 8, 2015, at 22:09, Ben Finney wrote:
> Steven D'Aprano writes:
>
> > '\udd00' should be a SyntaxError.
>
> I find your argument convincing, that attempting to construct a Unicode
> string of a lone surrogate should be an error.
>
> Shouldn't the error type be a ValueError, though? T
On Monday, March 9, 2015 at 7:39:42 AM UTC+5:30, Cameron Simpson wrote:
> On 07Mar2015 22:09, Steven D'Aprano wrote:
> >Rustom Mody wrote:
> >>[...big snip...]
> >> Some parts are here some earlier and from my memory.
> >> If details wrong please correct:
> >> - 200 million records
> >> - Containi
On Mon, Mar 9, 2015 at 1:09 PM, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> '\udd00' should be a SyntaxError.
>
> I find your argument convincing, that attempting to construct a Unicode
> string of a lone surrogate should be an error.
>
> Shouldn't the error type be a ValueError, though? The
Steven D'Aprano writes:
> '\udd00' should be a SyntaxError.
I find your argument convincing, that attempting to construct a Unicode
string of a lone surrogate should be an error.
Shouldn't the error type be a ValueError, though? The statement is not,
to my mind, erroneous syntax.
--
\ “P
On 07Mar2015 22:09, Steven D'Aprano
wrote:
Rustom Mody wrote:
[...big snip...]
Some parts are here some earlier and from my memory.
If details wrong please correct:
- 200 million records
- Containing 4 strings with SMP characters
- System made with python and mysql. SMP works with python, brea
Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> Marko Rauhamaa wrote:
>>> '\udd00' is a valid str object:
>>
>> Is it though? Perhaps the bug is not UTF-8's inability to encode lone
>> surrogates, but that Python allows you to create lone surrogates in
>> the first place. That's not a rhetorical q
On 08/03/2015 22:56, Cameron Simpson wrote:
On 08Mar2015 18:52, Mark Lawrence wrote:
On 08/03/2015 18:20, Steven D'Aprano wrote:
Mark Lawrence wrote:
On 08/03/2015 09:15, Cameron Simpson wrote:
Gotta love this:
TypeError: decoding with 'utf-8' codec failed (TypeError:
'_io.BufferedReader' d
On 08Mar2015 18:52, Mark Lawrence wrote:
On 08/03/2015 18:20, Steven D'Aprano wrote:
Mark Lawrence wrote:
On 08/03/2015 09:15, Cameron Simpson wrote:
Gotta love this:
TypeError: decoding with 'utf-8' codec failed (TypeError:
'_io.BufferedReader' does not support the buffer interface)
Not to
On Mon, Mar 9, 2015 at 8:23 AM, Mark Lawrence wrote:
> I'd raise an issue so there's a formal record that we can refer to in the
> future. Besides what's one issue like this compared to the "Python can't do
> decimal sums properly" which gets raised every few months by newbies :)
http://bugs.pyt
On 08/03/2015 21:15, Chris Angelico wrote:
b"\xed\xb4\x80".decode()
Traceback (most recent call last):
File "", line 1, in
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position
0: invalid continuation byte
But 0xED is not a continuation byte, it's a start byte. And it's a
per
>>> b"\xed\xb4\x80".decode()
Traceback (most recent call last):
File "", line 1, in
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position
0: invalid continuation byte
But 0xED is not a continuation byte, it's a start byte. And it's a
perfectly valid one:
>>> b"\xed\x9f\xbf".deco
On Mon, Mar 9, 2015 at 5:25 AM, Steven D'Aprano
wrote:
> Perhaps the bug is not UTF-8's inability to encode lone
> surrogates, but that Python allows you to create lone surrogates in the
> first place. That's not a rhetorical question. It's a genuine question.
As to the notion of rejecting the co
On Mon, Mar 9, 2015 at 5:25 AM, Steven D'Aprano
wrote:
> Marko Rauhamaa wrote:
>
>> Chris Angelico :
>>
>>> Once again, you appear to be surprised that invalid data is failing.
>>> Why is this so strange? U+DD00 is not a valid character.
>
> But it is a valid non-character code point.
>
>>> It is
Steven D'Aprano :
> Marko Rauhamaa wrote:
>> '\udd00' is a valid str object:
>
> Is it though? Perhaps the bug is not UTF-8's inability to encode lone
> surrogates, but that Python allows you to create lone surrogates in
> the first place. That's not a rhetorical question. It's a genuine
> questio
Hello,
I am working with pyqt framework and i'm looking for a calendar
(organizer) like korganizer, evolution or outlook calendar that is OS
indépendent with recurrence event. writting in python with an UI
framework (ex pyqt, pygtk, wkpython, tkinter or other ui framwork)
Where could I find
On 08/03/2015 18:20, Steven D'Aprano wrote:
Mark Lawrence wrote:
On 08/03/2015 09:15, Cameron Simpson wrote:
Gotta love this:
TypeError: decoding with 'utf-8' codec failed (TypeError:
'_io.BufferedReader' does not support the buffer interface)
Not to worry:-)
Cheers,
Cameron Simpson
Wha
On 08/03/2015 17:57, polyver...@gmail.com wrote:
On Saturday, March 7, 2015 at 5:36:07 PM UTC+1, Mark Lawrence wrote:
On 07/03/2015 15:55, polyver...@gmail.com wrote:
Out of curiosity, is there any plan to use a more recent version of Visual
Studio (i.e.: 2013) to compile the official Python3
Rustom Mody wrote:
> On Saturday, March 7, 2015 at 4:39:48 PM UTC+5:30, Steven D'Aprano wrote:
>> Rustom Mody wrote:
>> > This includes not just bug-prone-system code such as Java and Windows
>> > but seemingly working code such as python 3.
>>
>> What Unicode bugs do you think Python 3.3 and abo
Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Once again, you appear to be surprised that invalid data is failing.
>> Why is this so strange? U+DD00 is not a valid character.
But it is a valid non-character code point.
>> It is quite correct to throw this error.
>
> '\udd00' is a valid str o
Hi all, I apologize for taking so long to reply, but neither my work schedule
nor the weather have been kind in the past week. That said, I've been thinking
long and hard about what everyone has said, and have decided that it would be
useful to write a wrap-up email that attempts to encapsulate
Mark Lawrence wrote:
> On 08/03/2015 09:15, Cameron Simpson wrote:
>> Gotta love this:
>>
>> TypeError: decoding with 'utf-8' codec failed (TypeError:
>> '_io.BufferedReader' does not support the buffer interface)
>>
>> Not to worry:-)
>>
>> Cheers,
>> Cameron Simpson
>>
>
> What is the bug repo
On Saturday, March 7, 2015 at 5:36:07 PM UTC+1, Mark Lawrence wrote:
> On 07/03/2015 15:55, polyver...@gmail.com wrote:
> > Out of curiosity, is there any plan to use a more recent version of Visual
> > Studio (i.e.: 2013) to compile the official Python3 distribution for
> > Windows?
> > Is it in
Hi Jason,
Thanks for the response. Okay, Will try to convert 'struct test' into
new python object (say 'PyStructTest') and include it inside
CountDictType as pyobject instead of 'struct'.
Will post details here, If i encounter any issues.
Cheers,
Lakshmipathi.G
FOSS Programmer.
www.giis.co.in
On 08/03/2015 09:15, Cameron Simpson wrote:
Gotta love this:
TypeError: decoding with 'utf-8' codec failed (TypeError:
'_io.BufferedReader' does not support the buffer interface)
Not to worry:-)
Cheers,
Cameron Simpson
What is the bug report number?
--
My fellow Pythonistas, ask not what
Microsoft Research India is excited to introduce MEC (short for "Massively
Empowered Classrooms"), a research project designed to bring the highest
quality classroom material to every undergraduate engineering student in India.
Go to the website and get registered
http://bit.ly/1BV3uI9
4 course
Gotta love this:
TypeError: decoding with 'utf-8' codec failed (TypeError: '_io.BufferedReader'
does not support the buffer interface)
Not to worry:-)
Cheers,
Cameron Simpson
The Design View editor of Visual InterDev 6.0 is currently incompatible
with Compatibility Mode, and may not function
On Sun, Mar 8, 2015 at 7:09 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> Once again, you appear to be surprised that invalid data is failing.
>> Why is this so strange? U+DD00 is not a valid character. It is quite
>> correct to throw this error.
>
> '\udd00' is a valid str object:
>
>>>>
Chris Angelico :
> Once again, you appear to be surprised that invalid data is failing.
> Why is this so strange? U+DD00 is not a valid character. It is quite
> correct to throw this error.
'\udd00' is a valid str object:
>>> '\udd00'
'\udd00'
>>> '\udd00'.encode('utf-32')
b'\xff\xfe
Steven D'Aprano wrote:
> Marko Rauhamaa wrote:
>
>> Steven D'Aprano :
>>
>>> Marko Rauhamaa wrote:
>>>
That said, UTF-8 does suffer badly from its not being
a bijective mapping.
>>>
>>> Can you explain?
>>
>> In Python terms, there are bytes objects b that don't satisfy:
>>
>>b.d
33 matches
Mail list logo