On Friday, April 26, 2013 11:46:12 AM John Ehresman wrote:
> On 4/26/13 11:41 AM, Hugo Parente Lima wrote:
> > I still object to "cast any integer to an enum", you could argue
> > that this isn't pythonic due to the strong type check, however this
> > would imply into a possible segmentation fault on C++ side which I
> > would say isn't pythonic either.
> 
> How would converting integers into enums after checking that they were
> valid cause a segfault?

After checking they are valid wont cause any problems, but checking if they 
are valid on every function call seems like a unnecessary overhead IMO, 
although I don't have numbers to prove this possible overhead :-)

My point is about not doing the check plus converting every integer with a 
reinterpret_cast.

> Thanks,
> 
> John

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to