On 2010-04-20, Matti Airas wrote:
> On 20.04.2010 15:02, ext Mark Summerfield wrote:
> > Hi,
> >
> > Here's a new version of PSEP 101.
> >
> > I've modified the Rationale a little, renamed the main section to "API 1
> > vs. API 2" and rewritten its first few paras, and dropped the Changing
> > APIs section (since the idea is to just have one).
>
> Thanks. I applied minor tweaks to the reference and fixed some
> formatting (need :: before the indented block to make it verbatim). I
> also took the liberty of adding Hugo to the list of contributors and
> modifying the first paragraph of Rationale a bit (made it work without
> the Abstract and referred to PyQt when discussing the API differences
> and their uses.
>
> I'm now happy with the PSEP, especially since I realized that now it
> fully complies with my pet peeve (API compatibility between Python
> versions). :-) If there are no other objections and I get a green light
> from the core dev team members, I'll change its status to Accepted.
>
> http://www.pyside.org/docs/pseps/psep-0101.html
Seems good to me. However, there needs to be a decision about whether to
provide the QVariant(type, object) factory function or static
QVariant.type() methods. I prefer the factory function.
Also, I should have written them my Pythonically (rather than like
C++!):
# static functions approach
QVariant.ushort(pythonObject) -> QVariant
QVariant.uint(pythonObject) -> QVariant
# factory function approach (based on Richard Dale's ideas)
QVariant("ushort", pythonObject) -> QVariant
QVariant("uint", pythonObject) -> QVariant
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"Programming in Python 3 (Second Edition)" - ISBN 0321680561
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside