[matplotlib-devel] unused variables

2014-03-06 Thread Federico Ariza
Hello everybody

Stupid simple question
Is there a policy/tradition/convention to name unused variables inside the code?

Even better, if I see '''var''', can I replace it with '''_var''' and
nobody is going to complain?

I use eclipse and it complains about that (I like that it warns me). I
just wanted to know if I should just disable the warning when working
on matplotlib.

Federico

-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Developer summit at Scipy?

2014-03-06 Thread Nelle Varoquaux
Hello,

I've not been very active in the development of matplotlib these past
few months, but I'll answer anyways.
I'll be at Scipy this year, but I won't be able to stay after the
sprints. I have another conference right after.

Cheers,
N

On 2 March 2014 04:37, Thomas Caswell  wrote:
> I am still in the process of sorting out if I have funding to go.  If
> I am there, I would be interested in staying the extra day.
>
> Tom
>
> On Fri, Feb 28, 2014 at 11:20 PM, Damon McDougall
>  wrote:
>> I will be there.  I'm also willing to join in on any discussion.
>>
>> On Thu, Feb 27, 2014 at 10:28 AM, Michael Droettboom  wrote:
>>> How many matplotlib developers are planning to attend SciPy this year?
>>>
>>> If we used some of our funds to support an extra hotel night, would any
>>> of you be interested in spending an extra day for a "matplotlib
>>> developer summit" to discuss matplotlib projects?  This would be in
>>> addition to the sprints, which I see probably being a larger group. Your
>>> response isn't a committment at this point, I'm just trying to gauge how
>>> much interest there might be.
>>>
>>> Mike
>>>
>>> --
>>> _
>>> |\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
>>> |  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
>>>
>>> http://www.droettboom.com
>>>
>>>
>>> --
>>> Flow-based real-time traffic analytics software. Cisco certified tool.
>>> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>>> Customize your own dashboards, set traffic alerts and generate reports.
>>> Network behavioral analysis & security monitoring. All-in-one tool.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>>> ___
>>> Matplotlib-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>>
>>
>> --
>> Damon McDougall
>> http://www.damon-is-a-geek.com
>> Institute for Computational Engineering Sciences
>> 201 E. 24th St.
>> Stop C0200
>> The University of Texas at Austin
>> Austin, TX 78712-1229
>>
>> --
>> Flow-based real-time traffic analytics software. Cisco certified tool.
>> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>> Customize your own dashboards, set traffic alerts and generate reports.
>> Network behavioral analysis & security monitoring. All-in-one tool.
>> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
> --
> Thomas Caswell
> [email protected]
>
> --
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Developer summit at Scipy?

2014-03-06 Thread Eric Firing
On 2014/02/27 6:28 AM, Michael Droettboom wrote:
> How many matplotlib developers are planning to attend SciPy this year?

Most likely I will not.

Eric

>
> If we used some of our funds to support an extra hotel night, would any
> of you be interested in spending an extra day for a "matplotlib
> developer summit" to discuss matplotlib projects?  This would be in
> addition to the sprints, which I see probably being a larger group. Your
> response isn't a committment at this point, I'm just trying to gauge how
> much interest there might be.
>
> Mike
>


--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Eric Firing
On 2014/03/06 3:47 AM, Federico Ariza wrote:
> Hello everybody
>
> Stupid simple question
> Is there a policy/tradition/convention to name unused variables inside the 
> code?

Not yet.

>
> Even better, if I see '''var''', can I replace it with '''_var''' and
> nobody is going to complain?

That might be a good convention.  I don't particularly like a bare "_" 
because it is uninformative and visually a bit jarring.  Even if a 
variable is unused, it is nice to have a slight hint in its name as to 
what it is.

Eric

>
> I use eclipse and it complains about that (I like that it warns me). I
> just wanted to know if I should just disable the warning when working
> on matplotlib.
>
> Federico
>


--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Skip Montanaro
On Thu, Mar 6, 2014 at 7:47 AM, Federico Ariza  wrote:
> Stupid simple question
> Is there a policy/tradition/convention to name unused variables inside the 
> code?

While Eric indicates there is no policy, for the Python parts of your
code, I recommend you follow whatever the default is that pylint or
one of the other lint-like checkers recommend. Pylint likes a leading
underscore, but if you have a different natural preference, I
recommend you post your query at [email protected]. It's where
all the cool static checker folk hang out. I haven't read PEP 8 in a
long while. Does Guido express a preference there?

Skip (not a cool static checker guy)

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Ryan May
Hi,

I don't think a leading _ is the way to go, because that's a common
convention for internal class variables--property variables that you don't
intend to be part of any supported API.
Personally, I've always just called things like this "junk" or "unused",
but I know that's not as nice as having a symbolic notation.

Ryan


On Thu, Mar 6, 2014 at 11:38 AM, Skip Montanaro  wrote:

> On Thu, Mar 6, 2014 at 7:47 AM, Federico Ariza 
> wrote:
> > Stupid simple question
> > Is there a policy/tradition/convention to name unused variables inside
> the code?
>
> While Eric indicates there is no policy, for the Python parts of your
> code, I recommend you follow whatever the default is that pylint or
> one of the other lint-like checkers recommend. Pylint likes a leading
> underscore, but if you have a different natural preference, I
> recommend you post your query at [email protected]. It's where
> all the cool static checker folk hang out. I haven't read PEP 8 in a
> long while. Does Guido express a preference there?
>
> Skip (not a cool static checker guy)
>
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to
> Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and
> the
> freedom to use Git, Perforce or both. Make the move to Perforce.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>



-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Skip Montanaro
On Thu, Mar 6, 2014 at 2:38 PM, Ryan May  wrote:
> I don't think a leading _ is the way to go, because that's a common
> convention for internal class variables--property variables that you don't
> intend to be part of any supported API.

But leading underscores like this are only used as attributes of
classes. I believe the OP was asking about unused local variables.
Something more like this:

mode, _ino, dev, nlink, uid, gid, size, _atime, _mtime, _ctime =
os.stat("/etc/hosts")

(Ignore that os.stat returns a posix.stat_result object on Unix-y systems.)

Skip

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Nelle Varoquaux
On 6 March 2014 21:47, Skip Montanaro  wrote:
> On Thu, Mar 6, 2014 at 2:38 PM, Ryan May  wrote:
>> I don't think a leading _ is the way to go, because that's a common
>> convention for internal class variables--property variables that you don't
>> intend to be part of any supported API.
>
> But leading underscores like this are only used as attributes of
> classes. I believe the OP was asking about unused local variables.
> Something more like this:
>
> mode, _ino, dev, nlink, uid, gid, size, _atime, _mtime, _ctime =
> os.stat("/etc/hosts")

The convention is to use a simple _.

 mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")

>
> (Ignore that os.stat returns a posix.stat_result object on Unix-y systems.)
>
> Skip
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Federico Ariza
Skip,

That's exactly what I was referring to.

I check PEP8 and there is no mention of unused variables.


On Thu, Mar 6, 2014 at 3:47 PM, Skip Montanaro  wrote:
> On Thu, Mar 6, 2014 at 2:38 PM, Ryan May  wrote:
>> I don't think a leading _ is the way to go, because that's a common
>> convention for internal class variables--property variables that you don't
>> intend to be part of any supported API.
>
> But leading underscores like this are only used as attributes of
> classes. I believe the OP was asking about unused local variables.
> Something more like this:
>
> mode, _ino, dev, nlink, uid, gid, size, _atime, _mtime, _ctime =
> os.stat("/etc/hosts")
>
> (Ignore that os.stat returns a posix.stat_result object on Unix-y systems.)
>
> Skip



-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Federico Ariza
Nelle

Is that written somewhere?

On Thu, Mar 6, 2014 at 3:51 PM, Nelle Varoquaux
 wrote:
> On 6 March 2014 21:47, Skip Montanaro  wrote:
>> On Thu, Mar 6, 2014 at 2:38 PM, Ryan May  wrote:
>>> I don't think a leading _ is the way to go, because that's a common
>>> convention for internal class variables--property variables that you don't
>>> intend to be part of any supported API.
>>
>> But leading underscores like this are only used as attributes of
>> classes. I believe the OP was asking about unused local variables.
>> Something more like this:
>>
>> mode, _ino, dev, nlink, uid, gid, size, _atime, _mtime, _ctime =
>> os.stat("/etc/hosts")
>
> The convention is to use a simple _.
>
>  mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")
>
>>
>> (Ignore that os.stat returns a posix.stat_result object on Unix-y systems.)
>>
>> Skip
>>
>> --
>> Subversion Kills Productivity. Get off Subversion & Make the Move to 
>> Perforce.
>> With Perforce, you get hassle-free workflows. Merge that actually works.
>> Faster operations. Version large binaries.  Built-in WAN optimization and the
>> freedom to use Git, Perforce or both. Make the move to Perforce.
>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel



-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Thomas Caswell
I am with Eric, I find the bare `_` to be jarring and in some
fonts/color schemes can blend in too much.  I advocate for `_name`.

Just because the variable isn't used now, does not mean it won't be
used later and having sensible variable names on them can't hurt.

Tom

On Thu, Mar 6, 2014 at 3:53 PM, Federico Ariza  wrote:
> Nelle
>
> Is that written somewhere?
>
> On Thu, Mar 6, 2014 at 3:51 PM, Nelle Varoquaux
>  wrote:
>> On 6 March 2014 21:47, Skip Montanaro  wrote:
>>> On Thu, Mar 6, 2014 at 2:38 PM, Ryan May  wrote:
 I don't think a leading _ is the way to go, because that's a common
 convention for internal class variables--property variables that you don't
 intend to be part of any supported API.
>>>
>>> But leading underscores like this are only used as attributes of
>>> classes. I believe the OP was asking about unused local variables.
>>> Something more like this:
>>>
>>> mode, _ino, dev, nlink, uid, gid, size, _atime, _mtime, _ctime =
>>> os.stat("/etc/hosts")
>>
>> The convention is to use a simple _.
>>
>>  mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")
>>
>>>
>>> (Ignore that os.stat returns a posix.stat_result object on Unix-y systems.)
>>>
>>> Skip
>>>
>>> --
>>> Subversion Kills Productivity. Get off Subversion & Make the Move to 
>>> Perforce.
>>> With Perforce, you get hassle-free workflows. Merge that actually works.
>>> Faster operations. Version large binaries.  Built-in WAN optimization and 
>>> the
>>> freedom to use Git, Perforce or both. Make the move to Perforce.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>>> ___
>>> Matplotlib-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>> --
>> Subversion Kills Productivity. Get off Subversion & Make the Move to 
>> Perforce.
>> With Perforce, you get hassle-free workflows. Merge that actually works.
>> Faster operations. Version large binaries.  Built-in WAN optimization and the
>> freedom to use Git, Perforce or both. Make the move to Perforce.
>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
> --
> Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?
>
> -- Antonio Alducin --
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel



-- 
Thomas Caswell
[email protected]

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Nelle Varoquaux
On 6 March 2014 21:53, Federico Ariza  wrote:
> Nelle
>
> Is that written somewhere?

I think the convention originated from google's python style guide.
Pylint should warn you if you don't use this convention.


> On Thu, Mar 6, 2014 at 3:51 PM, Nelle Varoquaux
>  wrote:
>> On 6 March 2014 21:47, Skip Montanaro  wrote:
>>> On Thu, Mar 6, 2014 at 2:38 PM, Ryan May  wrote:
 I don't think a leading _ is the way to go, because that's a common
 convention for internal class variables--property variables that you don't
 intend to be part of any supported API.
>>>
>>> But leading underscores like this are only used as attributes of
>>> classes. I believe the OP was asking about unused local variables.
>>> Something more like this:
>>>
>>> mode, _ino, dev, nlink, uid, gid, size, _atime, _mtime, _ctime =
>>> os.stat("/etc/hosts")
>>
>> The convention is to use a simple _.
>>
>>  mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")
>>
>>>
>>> (Ignore that os.stat returns a posix.stat_result object on Unix-y systems.)
>>>
>>> Skip
>>>
>>> --
>>> Subversion Kills Productivity. Get off Subversion & Make the Move to 
>>> Perforce.
>>> With Perforce, you get hassle-free workflows. Merge that actually works.
>>> Faster operations. Version large binaries.  Built-in WAN optimization and 
>>> the
>>> freedom to use Git, Perforce or both. Make the move to Perforce.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>>> ___
>>> Matplotlib-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>> --
>> Subversion Kills Productivity. Get off Subversion & Make the Move to 
>> Perforce.
>> With Perforce, you get hassle-free workflows. Merge that actually works.
>> Faster operations. Version large binaries.  Built-in WAN optimization and the
>> freedom to use Git, Perforce or both. Make the move to Perforce.
>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
> --
> Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?
>
> -- Antonio Alducin --

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Skip Montanaro
On Thu, Mar 6, 2014 at 2:51 PM, Nelle Varoquaux
 wrote:
> The convention is to use a simple _.
>
>  mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")

Which is "pylint-compliant", but removes any description to future
readers (who might decide to use them) what the meaning of those
various unused values are.

Skip

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Nelle Varoquaux
On 6 March 2014 22:03, Skip Montanaro  wrote:
> On Thu, Mar 6, 2014 at 2:51 PM, Nelle Varoquaux
>  wrote:
>> The convention is to use a simple _.
>>
>>  mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")
>
> Which is "pylint-compliant", but removes any description to future
> readers (who might decide to use them) what the meaning of those
> various unused values are.

The opposite also holds: personally, my brain shuts down when I see an
underscore, because I know those values aro no use in this context. If
there are variables names that aren't use, it confuses me, and I try
to understand where they are use.
If I need to understand what exactly os.stat returns, I just read the
documentation, and not rely on some possibly misleading variable
names.

 We can debate hours whether these conventions are justified or not.
It all comes down to what's your habit.

>From the google style guide (pylint section):

Unused argument warnings can be suppressed by using `_' as the
identifier for the unused argument or prefixing the argument name with
`unused_'. In situations where changing the argument names is
infeasible, you can mention them at the beginning of the function. For
example:

def foo(a, unused_b, unused_c, d=None, e=None):
_ = d, e

return a

>
> Skip

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Skip Montanaro
On Thu, Mar 6, 2014 at 3:13 PM, Nelle Varoquaux
 wrote:
> If I need to understand what exactly os.stat returns, I just read the
> documentation, and not rely on some possibly misleading variable
> names.

Despite our wish that it wasn't so, it is likely that there is far
more undocumented than documented code out in the wild, or behind
firewalls where we can't see it. I just used os.stat as an example of
a well-known function that returns multiple values. (Precisely, so
people wouldn't have to run to the documentation or that I would have
to provide a more-fleshed-out example.) In my experience, there's no
real need to be intentionally obscure by not giving a variable a
meaningful, whether or not you intend/expect to use it. Besides, open
source code can serve as a living example of good coding practices.
Might as well do our best in that regard.

Just sayin'...

Skip

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Joe Kington
On Thu, Mar 6, 2014 at 3:03 PM, Skip Montanaro  wrote:

> On Thu, Mar 6, 2014 at 2:51 PM, Nelle Varoquaux
>  wrote:
> > The convention is to use a simple _.
> >
> >  mode, _, dev, nlink, uid, gid, size, _, _, _ = os.stat("/etc/hosts")
>
> Which is "pylint-compliant", but removes any description to future
> readers (who might decide to use them) what the meaning of those
> various unused values are.
>

Just to bikeshed a bit: There are common cases where a bare "_" really is a
good solution. E.g.

something = [object() for _ in range(10)]

It's immediately clear a) what "_" is, and b) that it's unused.  "for _i in
range(10)" is more jarring in that particular case, i.m.h.o.

I do agree that "_descriptive_name" is better in many situations.

I'd just argue for a "prefer this, but use your best judgement" type
guideline rather than a strict rule.

Then again, I'm not actively involved in development, so I probably
shouldn't hold too much of an opinion either way.
Cheers,
-Joe
--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Developer summit at Scipy?

2014-03-06 Thread Benjamin Root
I am awaiting approval from my superiors to pay for me to go this year. I
plan to split out my Anatomy of Matplotlib tutorial into two levels. If
that works out and both tutorials get accepted, then I would imagine that I
could spend an extra day. Would this extra day be before or after the week
of the conference?

Ben Root


On Thu, Mar 6, 2014 at 12:49 PM, Eric Firing  wrote:

> On 2014/02/27 6:28 AM, Michael Droettboom wrote:
> > How many matplotlib developers are planning to attend SciPy this year?
>
> Most likely I will not.
>
> Eric
>
> >
> > If we used some of our funds to support an extra hotel night, would any
> > of you be interested in spending an extra day for a "matplotlib
> > developer summit" to discuss matplotlib projects?  This would be in
> > addition to the sprints, which I see probably being a larger group. Your
> > response isn't a committment at this point, I'm just trying to gauge how
> > much interest there might be.
> >
> > Mike
> >
>
>
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to
> Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and
> the
> freedom to use Git, Perforce or both. Make the move to Perforce.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Chris Barker
On Thu, Mar 6, 2014 at 1:23 PM, Skip Montanaro  wrote:

> Despite our wish that it wasn't so, it is likely that there is far
> more undocumented than documented code out in the wild, or behind
> firewalls where we can't see it.


Well, then you're hosed anyway -- relying on the name of an unused variable
using a call for your docs is, shall we say not very robust.

In my experience, there's no
> real need to be intentionally obscure by not giving a variable a
> meaningful, whether or not you intend/expect to use it. Besides, open
> source code can serve as a living example of good coding practices.
> Might as well do our best in that regard.
>

then use "unused_meaningful_name"

it looks like pylint, anyway, will accept that.

Or is the goal here to come to a consensus for MPL style?

If so, I'm +1 on "_", and -0 on unused_meaningful_name

-Chris





>
> Just sayin'...
>
> Skip
>
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to
> Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and
> the
> freedom to use Git, Perforce or both. Make the move to Perforce.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[email protected]
--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] unused variables

2014-03-06 Thread Skip Montanaro
On Thu, Mar 6, 2014 at 3:58 PM, Chris Barker  wrote:
> it looks like pylint, anyway, will accept that.

Yes, pylint used to only accept a leading underscore by default as a
flag that a variable was unused. When I switched from pychecker to
pylint a few years ago, all my carefully crafted "unused_" variables
got flagged by pylint. I suggested adding that as another default
prefix, and they agreed.

Skip

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Developer summit at Scipy?

2014-03-06 Thread Ryan May
I'm hoping to return to more active status with a change in jobs now and
finally finishing off the thesis.

I should be at SciPy and would very much be interested in sticking around
to discuss development. (Though I should probably make sure the job will
pay for me to stick around for the sprints...)

Ryan


On Thu, Mar 6, 2014 at 2:33 PM, Benjamin Root  wrote:

> I am awaiting approval from my superiors to pay for me to go this year. I
> plan to split out my Anatomy of Matplotlib tutorial into two levels. If
> that works out and both tutorials get accepted, then I would imagine that I
> could spend an extra day. Would this extra day be before or after the week
> of the conference?
>
> Ben Root
>
>
> On Thu, Mar 6, 2014 at 12:49 PM, Eric Firing  wrote:
>
>> On 2014/02/27 6:28 AM, Michael Droettboom wrote:
>> > How many matplotlib developers are planning to attend SciPy this year?
>>
>> Most likely I will not.
>>
>> Eric
>>
>> >
>> > If we used some of our funds to support an extra hotel night, would any
>> > of you be interested in spending an extra day for a "matplotlib
>> > developer summit" to discuss matplotlib projects?  This would be in
>> > addition to the sprints, which I see probably being a larger group. Your
>> > response isn't a committment at this point, I'm just trying to gauge how
>> > much interest there might be.
>> >
>> > Mike
>> >
>>
>>
>>
>> --
>> Subversion Kills Productivity. Get off Subversion & Make the Move to
>> Perforce.
>> With Perforce, you get hassle-free workflows. Merge that actually works.
>> Faster operations. Version large binaries.  Built-in WAN optimization and
>> the
>> freedom to use Git, Perforce or both. Make the move to Perforce.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>
>
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to
> Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and
> the
> freedom to use Git, Perforce or both. Make the move to Perforce.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>


-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel