Re: Pylint false positives

2018-08-17 Thread Chris Angelico
On Sat, Aug 18, 2018 at 7:33 AM, Marko Rauhamaa wrote: > Chris Angelico : >> Programming is heavily about avoiding duplicated work. > > That is one aspect, but overcondensing and overabstracting programming > logic usually makes code less obvious to its maintainer. It is essential > to find coding

Re: Pylint false positives

2018-08-17 Thread Marko Rauhamaa
Chris Angelico : > Programming is heavily about avoiding duplicated work. That is one aspect, but overcondensing and overabstracting programming logic usually makes code less obvious to its maintainer. It is essential to find coding idioms that communicate ideas as clearly as possible. In some sit

Re: Pylint false positives

2018-08-17 Thread Steven D'Aprano
On Fri, 17 Aug 2018 15:19:05 +0200, Peter Otten wrote: > You usually do not want many identical (or very similar) methods because > invoking the right one is then errorprone, too, and you end up with an > interface that is hard to maintain. At some point you may need to > introduce subtle changes

Re: Pylint false positives

2018-08-17 Thread Steven D'Aprano
On Fri, 17 Aug 2018 11:49:01 +, Jon Ribbens wrote: > On 2018-08-17, Steven D'Aprano > wrote: >> On the other hand, your objection to the following three idioms is as >> good an example of the Blurb Paradox as I've ever seen. > > Do you mean the Blub Paradox? If so, you're misunderstanding or

Re: Program to output a subset of the composite numbers

2018-08-17 Thread Mark Lawrence
On 15/08/18 21:25, tomusa...@gmail.com wrote: Yes, I will try it! Thank you kindly. Please provide some context when you reply. This is the fourth message that you've sent but there's no immediate clue to whom you are answering. TIA :-) -- My fellow Pythonistas, ask not what our language

Re: Pylint false positives

2018-08-17 Thread Peter Otten
Frank Millman wrote: > I find that using a separate method per subclass does exactly what I want, > and that part of my project has been working stably for some time. I think that approach is fine. Do not let a tool have you bend over backwards. Do not give in to pylint's nagging when you are co

Re: Pylint false positives

2018-08-17 Thread Peter Otten
Chris Angelico wrote: > On Fri, Aug 17, 2018 at 9:49 PM, Jon Ribbens > wrote: >>> "Code running directly under the class" describes every use of the class >>> keyword (except those with an empty body). If you write: >>> >>> class Spam: >>> x = 1 >>> >>> you are running code under the

Re: Pylint false positives

2018-08-17 Thread Chris Angelico
On Fri, Aug 17, 2018 at 9:49 PM, Jon Ribbens wrote: >> "Code running directly under the class" describes every use of the class >> keyword (except those with an empty body). If you write: >> >> class Spam: >> x = 1 >> >> you are running code under the class. This is not just a pedantic

Re: Pylint false positives

2018-08-17 Thread Jon Ribbens
On 2018-08-17, Steven D'Aprano wrote: > On the other hand, your objection to the following three idioms is as > good an example of the Blurb Paradox as I've ever seen. Do you mean the Blub Paradox? If so, you're misunderstanding or at least misapplying it. >> * code running directly under the

Re: Pylint false positives

2018-08-17 Thread Frank Millman
"Dan Sommers" wrote in message news:pl622a$a1f$1...@blaine.gmane.org... On Fri, 17 Aug 2018 09:46:01 +0200, Frank Millman wrote: > It is just a slight annoyance (to me) that pylint complains about the > subclass methods when they are called from the Field class. I don't > mind adding 10 stub m

Re: Pylint false positives

2018-08-17 Thread Dan Sommers
On Fri, 17 Aug 2018 09:46:01 +0200, Frank Millman wrote: > It is just a slight annoyance (to me) that pylint complains about the > subclass methods when they are called from the Field class. I don't > mind adding 10 stub methods to the Field class to keep it happy, but I > do not get the feeling t

Re: printing to stdout

2018-08-17 Thread richard lucassen
On Fri, 17 Aug 2018 08:31:22 +1000 Cameron Simpson wrote: > This isn't specific to Python, you'll find it with most programmes. > (The shell's builtin "echo" command is an exception.) [buffer explanation] I already suspectec a buffered output and to check if it was the buffer, I created a lot o

Re: Pylint false positives

2018-08-17 Thread Frank Millman
"Steven D'Aprano" wrote in message news:pl5qbk$r7k$5...@blaine.gmane.org... On Fri, 17 Aug 2018 08:14:02 +0200, Frank Millman wrote: > I find that using a separate method per subclass does exactly what I > want, and that part of my project has been working stably for some time. You might cons

Re: lxml namespace as an attribute

2018-08-17 Thread Stefan Behnel
Skip Montanaro schrieb am 15.08.2018 um 23:25: > Much of XML makes no sense to me. Namespaces are one thing. If I'm > parsing a document where namespaces are defined at the top level, then > adding namespaces=root.nsmap works when calling the xpath method. I > more-or-less get that. > > What I don