On Mar 15, 2013 4:01 PM, "Christophe BAL" <projet...@gmail.com> wrote:
>
> Hello,
> I really appreciate the work done by matplotlib but I really think that
> the interface must evolve. Here is a small example.
>
>     object.set_something(...)
>     object.get_something()
>
> It could be easier to use a jQuery like style as in the following lines.
>
>     object(...)
>     object()
>
> This will considerably simplify things.
>
>
> Here is a more realistic example.
>
>     fig = pylab.figure()
>     ax  = fig.add_subplot(1,1,1)
>
>     ax.set_xlabel("xLabel")
>     ax.set_ylabel("yLabel")
>
> The a jQuery like style would be as in the following lines.
>
>     fig = pylab.figure()
>     ax  = fig.add_subplot(1,1,1)
>
>     ax(xlabel = "xLabel", ylabel = "yLabel")
>
> I don't know enough matplotlib to propose other examples
> but I really think that there is a lot of things that could make
> matplotlib much more Pythonicly easy to use.
>
> Christophe BAL
>

I don't personally like this approach. Python has very clear separation
between the initialization of methods, which acts like a function that
returns an instance, and the modification of existing instances, which uses
attributes. This syntax muddies the distinction, having something that
should behave like an instance instead behaving as a function.

Is there any precedence for using this sort of syntax in python?  I have
not seen it anywhere else. You mention jQuery, but that is JavaScript not
python. As far as I have seen
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to