Re: [Tutor] Quick Pythonic Style Tips

2017-07-24 Thread Abdur-Rahmaan Janhangeer
nice, just wanted some "styling" guide rather than technical guides you know doing things the python style rather than the python way Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 24 Jul 2017 05:09, "Steven D'Aprano" wrote: > On Sun, Jul 23,

Re: [Tutor] Quick Pythonic Style Tips

2017-07-23 Thread Cameron Simpson
On 23Jul2017 19:02, Abdur-Rahmaan Janhangeer wrote: ah pylint yes, great checker ! *some guys thought of inventing it* Yes, very handy. Greate for checking for simple logic errors too (variable used but never bound, missing imports, etc). Just for folks' interest, I

Re: [Tutor] Quick Pythonic Style Tips

2017-07-23 Thread Steven D'Aprano
On Sun, Jul 23, 2017 at 07:02:09PM +0400, Abdur-Rahmaan Janhangeer wrote: > assert(... is liked by some strongly typed programmers Not just strongly-typed programmers: http://import-that.dreamwidth.org/676.html > data encapsulation might be depressing to some migrating coders "Data

Re: [Tutor] Quick Pythonic Style Tips

2017-07-23 Thread Abdur-Rahmaan Janhangeer
Thanks everybody, i wanted to get some pythonic ideas. yes forgot that assert(... is liked by some strongly typed programmers anInt -> did not not some people liked tha data encapsulation might be depressing to some migrating coders ah pylint yes, great checker ! *some guys thought of

Re: [Tutor] Quick Pythonic Style Tips

2017-07-22 Thread Danny Yoo
> I'd like to contibute a rather different sort of tidbit to what Alan > wrote: be really careful about using mutable data types in function > calls, as class variables, and just in general. By the way, there are some tools known as "linters" that can help catch these kind of errors.

Re: [Tutor] Quick Pythonic Style Tips

2017-07-22 Thread Mats Wichmann
On 07/22/2017 07:46 AM, Alan Gauld via Tutor wrote: > On 22/07/17 12:20, Abdur-Rahmaan Janhangeer wrote: > >> As a user switching between some languages, it took sometimes before i >> discovered that there was a styling guide in python > > There are style idioms in most languages although not

Re: [Tutor] Quick Pythonic Style Tips

2017-07-22 Thread Alan Gauld via Tutor
On 22/07/17 12:20, Abdur-Rahmaan Janhangeer wrote: > As a user switching between some languages, it took sometimes before i > discovered that there was a styling guide in python There are style idioms in most languages although not always written down as clearly as in PEP8. That having been said

[Tutor] Quick Pythonic Style Tips

2017-07-22 Thread Abdur-Rahmaan Janhangeer
Hi all, As a user switching between some languages, it took sometimes before i discovered that there was a styling guide in python (obviously from not so kind users when asking on forums). as i did not learnt python as first lang, i learnt only the syntax (no need to relearn concepts) besides