Dunder variables

2018-01-08 Thread Frank Millman
Hi all I have read that one should not call dunder methods in application code. Does the same apply to dunder variables? I am thinking of the instance attribute __dict__, which allows access to the contents of the instance. I only want to read from __dict__, not update it. Is this frowned upo

How to create "transitional" package?

2018-01-08 Thread INADA Naoki
Hi, all. Yesterday, I released msgpack-0.5, which was msgpack-python. Both packages provide "msgpack" python package. I used msgpack in early days, but easy_install crawling website and download msgpack-1.0.0.tar.gz, which is msgpack for C instead of Python package I upload to PyPI. So I renamed

Re: Native object exposing buffer protocol

2018-01-08 Thread breamoreboy
On Saturday, January 6, 2018 at 12:02:18 AM UTC, Rob Gaddi wrote: > I'd like to create a native Python object that exposes the buffer > protocol. Basically, something with a ._data member which is a > bytearray that I can still readinto, make directly into a numpy array, etc. > > I can do it by

Re: How do I send keystrokes to a console window in Windows XP?

2018-01-08 Thread zxymike93
在 2005年7月16日星期六 UTC+8下午8:46:34,Benji York写道: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shell") > shell.AppActivate("Command Prompt") > > shell.Send

Re: Native object exposing buffer protocol

2018-01-08 Thread Rob Gaddi
On 01/05/2018 04:27 PM, Ben Finney wrote: Rob Gaddi writes: I'd like to create a native Python object that exposes the buffer protocol. Basically, something with a ._data member which is a bytearray that I can still readinto, make directly into a numpy array, etc. The “etc.” seems pretty im

fun with cwrap: Unknown type kind 114

2018-01-08 Thread Etienne Robillard
Dear Eli, Can you please take a look at: https://bitbucket.org/tkadm30/libuwsgictl/raw/048978bf2b51b1185302da98c5063978061293df/tests/cwrap/error I'm playing around with cwrap: https://github.com/geggo/cwrap Looks like this *gem* can generate Cython pxd files from C headers using libclang. :

Re: Why does __ne__ exist?

2018-01-08 Thread Chris Angelico
On Tue, Jan 9, 2018 at 3:25 AM, Cody Piersall wrote: >> Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, >> just like with __contains__. Go ahead: sell the notion of __ne__. >> Pitch it, show why we absolutely need to allow this. Make sure you >> mention the potential confusio

Re: : ✨🍰✨ python 2018 wiki - a piece of cake ✨🍰✨ --- 🙄🙄🙄

2018-01-08 Thread alister via Python-list
On Mon, 08 Jan 2018 15:55:00 +, user net wrote: > Abdur-Rahmaan Janhangeer: >> there is a language called python by guido >> >> you can ask your questions here ! > > > > ✨🍰✨ python - a piece of cake ✨🍰✨ > > > when u read this post in thunderbird or torBrowser, you see colored > emo

Re: Why does __ne__ exist?

2018-01-08 Thread Antoon Pardon
Op 08-01-18 om 17:25 schreef Cody Piersall: >> Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, >> just like with __contains__. Go ahead: sell the notion of __ne__. >> Pitch it, show why we absolutely need to allow this. Make sure you >> mention the potential confusion when sub

Re: Plot map wit a white and black box

2018-01-08 Thread breamoreboy
On Monday, January 8, 2018 at 1:16:08 PM UTC, jorge@cptec.inpe.br wrote: > Hi, > > Please, I woudl like to plot a map like this figure. How can I do this > using Python2.7 > > Thanks, > > Conrado Figures don't get through and you've all ready asked this question, possibly on another forum

Re: Why does __ne__ exist?

2018-01-08 Thread Cody Piersall
> Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, > just like with __contains__. Go ahead: sell the notion of __ne__. > Pitch it, show why we absolutely need to allow this. Make sure you > mention the potential confusion when subclassing. Be sure to show why > it's okay for "n

Re: : ✨🍰✨ python 2018 wiki - a piece of cake ✨🍰✨ --- 🙄🙄🙄

2018-01-08 Thread Abdur-Rahmaan Janhangeer
there is a language called python by guido you can ask your questions here ! On 5 Jan 2018 23:30, "Kim of K." wrote: > OK now we have emoji in XPN > > > but not in colour like in torBrowser... > > > :-( > > > 🙄 > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://ma

Re: Why does __ne__ exist?

2018-01-08 Thread Antoon Pardon
Op 08-01-18 om 00:53 schreef Ethan Furman: > On 01/07/2018 12:33 PM, Chris Angelico wrote: > > Actually, I think it is why it exists.  If I recall correctly, the > addition of the six comparative operators* was added at the behest of > the scientific/numerical community. Which personnaly, I think

Re: Why does __ne__ exist?

2018-01-08 Thread Oren Ben-Kiki
Good points. Well, this is pretty academic at this point - I don't think anyone would seriously choose to obsolete __ne__, regardless of whether it is absolutely necessary or not. On Mon, Jan 8, 2018 at 4:51 PM, Thomas Jollans wrote: > On 2018-01-08 15:25, Oren Ben-Kiki wrote: > > I don't see a

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Jollans
On 2018-01-08 15:25, Oren Ben-Kiki wrote: > I don't see a case in IEEE where (x == y) != !(x != y). > There _is_ a case where (x != x) is true (when x is NaN), but for such an > x, (x == x) will be false. > > I am hard pressed to think of a case where __ne__ is actually useful. See my earlier ema

Re: Why does __ne__ exist?

2018-01-08 Thread Oren Ben-Kiki
Ugh, right, for NaN you can have (x < y) != (x >= y) - both would be false if one of x and y is a NaN. But __ne__ is still useless ;-) On Mon, Jan 8, 2018 at 4:36 PM, Thomas Nyberg wrote: > On 01/08/2018 03:25 PM, Oren Ben-Kiki wrote: > > I am hard pressed to think of a case where __ne__ is act

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Nyberg
On 01/08/2018 03:25 PM, Oren Ben-Kiki wrote: > I am hard pressed to think of a case where __ne__ is actually useful. Assuming you're talking about a case specifically for IEEE 754, I'm starting to agree. In general, however, it certainly is useful for some numpy objects (as mentioned elsewhere in

Re: Why does __ne__ exist?

2018-01-08 Thread Oren Ben-Kiki
I don't see a case in IEEE where (x == y) != !(x != y). There _is_ a case where (x != x) is true (when x is NaN), but for such an x, (x == x) will be false. I am hard pressed to think of a case where __ne__ is actually useful. That said, while it is true you only need one of (__eq__, __ne__), you

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Nyberg
On 01/08/2018 12:36 PM, Thomas Jollans wrote: > > Interesting sentence from that PEP: > > "3. The == and != operators are not assumed to be each other's > complement (e.g. IEEE 754 floating point numbers do not satisfy this)." > > Does anybody here know how IEE 754 floating point numbers need __

Re: has sourceforge exposed the dirty little secret ?

2018-01-08 Thread Abdur-Rahmaan Janhangeer
fuel the troll ** poor py ** On 5 Jan 2018 20:30, "Kim of K." wrote: > > "Background > > We feel that the world still produces way too much software that is > frankly substandard. The reasons for this are pretty simple: software > producers do not pay enough attention [...]" > > > quote from htt

Plot map wit a white and black box

2018-01-08 Thread jorge . conrado
Hi, Please, I woudl like to plot a map like this figure. How can I do this using Python2.7 Thanks, Conrado -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does __ne__ exist?

2018-01-08 Thread Thomas Jollans
On 2018-01-08 01:31, breamore...@gmail.com wrote: > On Monday, January 8, 2018 at 12:02:09 AM UTC, Ethan Furman wrote: >> On 01/07/2018 12:33 PM, Chris Angelico wrote: >>> On Mon, Jan 8, 2018 at 7:13 AM, Thomas Jollans wrote: On 07/01/18 20:55, Chris Angelico wrote: > Under what circumstan