PyObject_IsInstance is not safe when used to check if the object is an
instance of specified builtin type. Typical code:
rc = PyObject_IsInstance(obj, &Someting_Type);
if (rc < 0) return NULL;
if (rc) {
SometingObject *something = (SometingObject *)obj;
something->som
Serhiy Storchaka wrote:
PyObject_IsInstance is not safe when used to check if the object is an
instance of specified builtin type.
The __class__ attribute can be modified and PyObject_IsInstance() can
return true if the object has not layout compatible with specified
structure.
Code that re
On 18.05.15 15:14, Greg Ewing wrote:
Serhiy Storchaka wrote:
PyObject_IsInstance is not safe when used to check if the object is an
instance of specified builtin type.
The __class__ attribute can be modified and PyObject_IsInstance() can
return true if the object has not layout compatible with
Serhiy Storchaka wrote:
May be modify PyObject_IsInstance so that it will never return
true if layouts are not compatible?
That wouldn't be a good idea, since PyObject_IsInstance is
meant to reflect the behaviour of python's isinstance()
function, which doesn't care about C layouts.
--
Greg
__
18.05.2015, 02:50, Guido van Rossum kirjoitti:
On Sun, May 17, 2015 at 3:07 PM, Alex Grönholm
mailto:alex.gronh...@nextday.fi>> wrote:
Looking at PEP 484, I came up with two use cases that I felt were
not catered for:
1. Specifying that a parameter should be a subclass of anothe
> > Looking at PEP 484, I came up with two use cases that I felt were not
> > catered for:
> >
> >1. Specifying that a parameter should be a subclass of another
> >(example: Type[dict] would match dict or OrderedDict; plain "Type"
would
> >equal "type" from builtins)
> >
> >
> I don't
On Mon, May 18, 2015 at 12:14 AM, Alex Grönholm
wrote:
>
>
> 18.05.2015, 02:50, Guido van Rossum kirjoitti:
>
> On Sun, May 17, 2015 at 3:07 PM, Alex Grönholm
> wrote:
>
>> Looking at PEP 484, I came up with two use cases that I felt were not
>> catered for:
>>
>>1. Specifying that a param
Thanks Cristian, that clears up a couple things -- got it compiling without
warning.
But I also discovered that I must have not pushed the latest copy yesterday.
It's on a machine at home -- I'll push it tonight. But the copy on gitHub
now is mostly good -- I think the only changes are handling t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 2015-05-18 17:49, Chris Barker wrote:
> Thanks Cristian, that clears up a couple things -- got it
> compiling without warning.
>
> But I also discovered that I must have not pushed the latest copy
> yesterday.
>
> It's on a machine at home -- I'
18.05.2015, 18:05, Guido van Rossum kirjoitti:
On Mon, May 18, 2015 at 12:14 AM, Alex Grönholm
mailto:alex.gronh...@nextday.fi>> wrote:
18.05.2015, 02:50, Guido van Rossum kirjoitti:
On Sun, May 17, 2015 at 3:07 PM, Alex Grönholm
mailto:alex.gronh...@nextday.fi>> wrote:
Can you add your example to the issue?
https://github.com/ambv/typehinting/issues/107
We're trying to finish up PEP 484 in the next few days (wait for an
announcement :-) and we just don't have time for every use case; but over
the course of 3.5 we will be adding features that are considered usefu
I am trying to get Replicatorg to use python to gcode but it keeps giving the
error "generate Gcode requires that a Python interpreter be installed. Would
you like to visit the Python download page now?
I tell it no because I have it installed. I have even gone in and selected the
path for t
Hi Lisa,
It's unlikely that anyone on this list can help you with this. It's a
question you should ask of the ReplicatorG people, not the Python people...
--Guido
On Mon, May 18, 2015 at 12:02 PM, Lisa Colvard <
lcolv...@horrycountyschools.net> wrote:
> I am trying to get Replicatorg to use py
On 5/18/2015 4:18 PM, Guido van Rossum wrote:
It's unlikely that anyone on this list can help you with this. It's a
question you should ask of the ReplicatorG people, not the Python people...
If that does not work, try stackoverflow, or possibly even python-list.
This list is focused only on
Lisa,
As noted, not the right list.
But seeing this kind of stuff done in High Schools is GREAT!
So one suggestion:
If this is Windows, there are two versions of python for Windows: 32bit and
64bit -- if an installer for a third-party package is looking for one of
those, and the other is instal
15 matches
Mail list logo