Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

canvas() or Canvas()

Hi,
Maybe it's a dumb question, but is the class named Canvas() (with capital C) or canvas(). Both of them seem to work, and it seems that the canvas() version is older. Will it be deprecated? Is there any difference between the two classes?

Comments

  • Hi Bruno,

    There is no difference: they are aliases. In OpenSesame 3.2, the API has been reworked to meet the PEP-8 style guidelines, which posit that class names should be capitalized. But backwards compatibility is of course preserved.

    Cheers,
    Sebastiaan

    PS. Canvas() is actually a factory function that returns a class, and not a class itself. But that makes no practical difference in most cases.

  • ok, understood, thanks for the fast answer!

Sign In or Register to comment.