Re: array of characters?

2019-03-22 Thread Gregory Ewing

Paul Rubin wrote:

- array('u') works but it is deprecated, and (not sure) the doc page
  says the object size is 2 bytes, so it may only handle BMP characters


The docs actually say "Depending on the platform, it can be 16 bits or 32
bits".

With Python 3.5 on MacOSX, it seems to work and hold the full range of
unicode characters.

Not sure why this is being deprecated instead of just making it always
32 bits. I'll make some enquiries.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: how to handle response data that is streaming and chunked?

2019-03-22 Thread Artie Ziff
>
>
> What do you mean by "response library"?
>

So sorry for the vocabulary mislead.
I intended to write "requests" referring to the http networking lib with
the bazillion downloads. ;-)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: array of characters?

2019-03-22 Thread Ian Kelly
I don't know the answer, and PEP 393 doesn't talk about the array('u')
deprecation directly. But it seems to me that with Py_UNICODE going away
this array type code would have to be completely reimplemented, and also at
that point array('u') is just equivalent to array('L') with some extra
conversion semantics. Maybe it's simply deprecated because nobody has
proposed keeping it and anybody who really wants it can accomplish the same
with 'L'.

On Fri, Mar 22, 2019 at 1:28 AM Gregory Ewing 
wrote:

> Paul Rubin wrote:
> > - array('u') works but it is deprecated, and (not sure) the doc page
> >   says the object size is 2 bytes, so it may only handle BMP characters
>
> The docs actually say "Depending on the platform, it can be 16 bits or 32
> bits".
>
> With Python 3.5 on MacOSX, it seems to work and hold the full range of
> unicode characters.
>
> Not sure why this is being deprecated instead of just making it always
> 32 bits. I'll make some enquiries.
>
> --
> Greg
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Might be doing this wrong? (Turtle graphics)

2019-03-22 Thread Peter J. Holzer
On 2019-03-21 00:44:46 -0400, Terry Reedy wrote:
> On 3/20/2019 7:34 PM, jasonanyil...@gmail.com wrote:
> > So, I typed in code:
> > from turtle import *
> > forward(100)
> > right(120)
> > clear()
> > It didn't work! It kept on saying that there was an indent and the first 
> > line was wrong. Help!
> 
> that suggests that what you typed above is not what you ran.

To be more specific, it suggests that jasonanyilian had some whitespace
at the beginning of a line. Unlike most programming languages, Python is
picky about whitespace at the beginning of lines (the "indentation").
This can be a problem when you copy and paste fragments of code.

hp

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list