On Thursday 16 June 2011 08:25:54 Thomas Perl wrote: > Hi, > > 2011/6/16 Hugo Parente Lima <[email protected]>: > > On Wednesday 15 June 2011 16:37:32 Christian Brugger wrote: > >> > Right, such check will only slow down the object creation for all > >> > objects while it's only useful for broken code, implement such check > >> > seems not to be a good idea IMO. > >> > >> [...] > >> Try to resolve the method. If that is not possible (AttributeError) > >> print warning and return dummy object to C++ interface. > >> [...] > > > > This is exactly what is done, and the dummy C++ object can cause a lot of > > undefined behavior to C++ caller as you have seem. > > I don't remember too well, but wasn't there some discussion about a > "pedantic" mode where PySide turns all warnings into errors, which > could help in tracking down these problems while still allowing for > "normal" code to run fast? If so, could we maybe introduce something > like this in 1.1 or is it a 2.x thingie? It would be great for > debugging (i.e. "My code does strange things" - "Run PySide in > pedantic mode" - "Ah! Here is the exception").
It already do this (on git version only ATM) for return type check of virtual functions when these functions were called by C++, the old behavior was just to print the exception, now it throws a warning. > Thomas -- Hugo Parente Lima INdT - Instituto Nokia de Tecnologia
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
