Re: Operator Precedence/Boolean Logic

2016-06-22 Thread Rustom Mody
On Thursday, June 23, 2016 at 10:17:16 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Thursday, June 23, 2016 at 3:12:52 PM UTC+12, Larry Hudson wrote: > > On 06/22/2016 12:42 AM, Lawrence D’Oliveiro wrote: > >> * boolean operators don’t have to operate on boolean values. The > >> language spec >

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-22 Thread Rustom Mody
On Tuesday, June 21, 2016 at 7:27:00 PM UTC+5:30, Rustom Mody wrote: > >https://wiki.archlinux.org/index.php/Keyboard_configuration_i > >n_Xorg> -- no good You probably want this: https://wiki.archlinux.org/index.php/X_KeyBoard_extension#Editing_the_layout > > S

Re: while Loops

2016-06-21 Thread Rustom Mody
On Wednesday, June 22, 2016 at 9:20:35 AM UTC+5:30, Elizabeth Weiss wrote: > i=1 > while i<=5: >print(i) >i=i+1 > > The result is: > 1 > 2 > 3 > 4 > 5 > > Why is one of the results 5 since i=i+1? Should the maximum result be 4 since > 4 +1=5? > Not sure what your question is But I

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-21 Thread Rustom Mody
On Tuesday, June 21, 2016 at 6:38:19 PM UTC+5:30, Marko Rauhamaa wrote: > A coworker of mine went through the trouble of doing the xmodmap > equivalent with setxkbmap. Thought of interviewing him about it one day. > > How-to's are really hard to come by: > >

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-21 Thread Rustom Mody
On Tuesday, June 21, 2016 at 7:27:00 PM UTC+5:30, Rustom Mody wrote: > Emacs: : > Math: So far Ive used tex input method -- Not satisfactory After "Random832" pointed me to RFC1345 I checked that emacs has an RFC1345 input method. It may be nicer than tex input method -- need

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-21 Thread Rustom Mody
On Tuesday, June 21, 2016 at 6:38:19 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > On Tuesday, June 21, 2016 at 2:05:55 PM UTC+5:30, Marko Rauhamaa wrote: > >> (On the other hand, I have always specified my preferred keyboard > >> layout with .Xmodmap.)

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-21 Thread Rustom Mody
On Tuesday, June 21, 2016 at 2:05:55 PM UTC+5:30, Marko Rauhamaa wrote: > Larry Hudson : > > It sounds like you are almost, but not quite, describing the Linux > > Compose key. > > I have used Linux since the 1990's but don't know anything about "the > Linux Compose key." It used to be a real

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-20 Thread Rustom Mody
On Monday, June 20, 2016 at 8:30:25 PM UTC+5:30, Steven D'Aprano wrote: > On Tue, 21 Jun 2016 12:23 am, Grant Edwards wrote: > > > On 2016-06-20, Phil Boutros wrote: > [...] > >> Ctrl-K, =, ! (last two steps interchangeable). Done. Result: ≠ > > > > On any non-broken X11 system it's: = / >

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-20 Thread Rustom Mody
On Monday, June 20, 2016 at 11:34:36 AM UTC+5:30, Random832 wrote: > On Mon, Jun 20, 2016, at 01:03, Rustom Mody wrote: > > > Ctrl-K, =, ! (last two steps interchangeable). Done. Result: ≠ > > > > Are these 'shortcuts' parameterizable? > > They originate fro

Re: best text editor for programming Python on a Mac

2016-06-20 Thread Rustom Mody
On Monday, June 20, 2016 at 7:06:57 PM UTC+5:30, Christian Gollwitzer wrote: > Am 20.06.16 um 15:26 schrieb Random832: > > The point is that in vim you > > can't position the normal-mode cursor in such a way that inserted > > characters are inserted at the end of the line. > > But you can press i

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-19 Thread Rustom Mody
On Monday, June 20, 2016 at 10:01:00 AM UTC+5:30, Phil Boutros wrote: > Steven D'Aprano wrote: > > > > Quote: > > > > "Why do we have to write x!=y then argue about the status of x<>y when we > > can simply write x≠y?" > > > > "Simply"? > > > > This is how I write x≠y from scratch: > > > To

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-19 Thread Rustom Mody
On Monday, June 20, 2016 at 10:06:41 AM UTC+5:30, Rustom Mody wrote: > I have greater horror-stories to describe if you like > On my recent ubuntu upgrade my keyboard broke -- totally ie cant type > anything. > Here's a detailed rundown... > > Upgrade complete; reboot -- NO

Re: ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-19 Thread Rustom Mody
On Monday, June 20, 2016 at 8:59:44 AM UTC+5:30, Steven D'Aprano wrote: > Without better tooling and more discoverability, non-ASCII characters as > syntax are an anti-feature. You need to decide which hat you have on - idealist - pragmatist From a pragmatic pov nothing you are saying below is

ASCII or Unicode? (was best text editor for programming Python on a Mac)

2016-06-19 Thread Rustom Mody
On Monday, June 20, 2016 at 7:03:01 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 20 Jun 2016 04:58 am, Michael Torrie wrote: > > > When the cursor is over character, do command "ga" and it will show you > > the hex code for that character. > > > >

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Rustom Mody
On Sunday, June 19, 2016 at 11:36:17 PM UTC+5:30, Christian Gollwitzer wrote: > Am 19.06.16 um 18:20 schrieb Rustom Mody: > > I gave an emacs solution to the issue not because I find editor-wars > > engaging > > but because I dont know how to do *this* with vi. > > I'd

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Rustom Mody
On Sunday, June 19, 2016 at 6:49:55 PM UTC+5:30, Michael Torrie wrote: > On 06/19/2016 04:41 AM, Pete Forman wrote: > > Both emacs and vim are powerful tools in the hands of experienced users > > but I would recommend neither to someone starting out who is just > > looking for a code-aware editor.

Re: Method Chaining

2016-06-19 Thread Rustom Mody
On Sunday, June 19, 2016 at 9:26:54 PM UTC+5:30, Ethan Furman wrote: > On 06/19/2016 08:14 AM, Michael Torrie wrote: > > On 06/19/2016 09:01 AM, Ethan Furman wrote: > >> On 06/19/2016 04:56 AM, Joonas Liik wrote: > >>> On 18 June 2016 at 23:47, Ethan Furman wrote: > On 06/18/2016 07:05 AM,

Re: best text editor for programming Python on a Mac

2016-06-19 Thread Rustom Mody
On Sunday, June 19, 2016 at 1:04:37 PM UTC+5:30, Lawrence D’Oliveiro wrote: > On Sunday, June 19, 2016 at 7:13:26 PM UTC+12, Christian Gollwitzer wrote: > > > Am 19.06.16 um 02:12 schrieb Lawrence D’Oliveiro: > > > >> But not vi/vim. It only lets you place your cursor *on* a character, > >> not

Re: best text editor for programming Python on a Mac

2016-06-18 Thread Rustom Mody
On Saturday, June 18, 2016 at 3:10:23 PM UTC+5:30, Marko Rauhamaa wrote: > Michael Vilain : > > > "best" is subjective. Anytime someone wants the "best", I ask "what > > features are important to you that would make it the best" because I'm > > pretty sure what I find important wouldn't be what

Re: Method Chaining

2016-06-18 Thread Rustom Mody
On Saturday, June 18, 2016 at 5:34:30 PM UTC+5:30, Pete Forman wrote: > Rustom Mody writes: > > > On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: > >> On Fri, 17 Jun 2016 06:13 pm, Ned Batchelder wrote: > >> > >> > To me, i

Re: Method Chaining

2016-06-17 Thread Rustom Mody
On Friday, June 17, 2016 at 2:58:19 PM UTC+5:30, Steven D'Aprano wrote: > On Fri, 17 Jun 2016 06:13 pm, Ned Batchelder wrote: > > > To me, it's a toss-up. The chained version is nice in that it removes the > > repetition of "g". But the unchained version is more explicit, and avoids > > the

Re: What is structured programming (was for/while else doesn't make sense)

2016-06-17 Thread Rustom Mody
On Friday, June 17, 2016 at 7:23:27 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Thursday, June 16, 2016 at 11:13:14 PM UTC+12, Rustom Mody wrote: > > > Please see https://en.wikipedia.org/wiki/Nassi%E2%80%93Shneiderman_diagram > > > > | Nassi–Shneiderman diagrams

Re: What is structured programming (was for/while else doesn't make sense)

2016-06-16 Thread Rustom Mody
On Thursday, June 16, 2016 at 11:27:15 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Thursday, June 16, 2016 at 5:48:48 PM UTC+12, Rustom Mody wrote: > > On Thursday, June 16, 2016 at 8:25:10 AM UTC+5:30, Lawrence D’Oliveiro > > wrote: > > So here is the formal definition I

What is structured programming (was for/while else doesn't make sense)

2016-06-15 Thread Rustom Mody
On Thursday, June 16, 2016 at 8:25:10 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Thursday, June 16, 2016 at 1:51:54 AM UTC+12, Random832 wrote: > > ... and in particular it does not establish that break is in any way > > less structured than any other constructs that have keywords. > >

Re: for / while else doesn't make sense

2016-06-15 Thread Rustom Mody
On Wednesday, June 15, 2016 at 9:24:21 PM UTC+5:30, Random832 wrote: > On Wed, Jun 15, 2016, at 10:20, Rustom Mody wrote: > > Claim is that the damaging propensities of goto are replicable with > > break. > > The "damaging propensity" in this particular case simply

Re: for / while else doesn't make sense

2016-06-15 Thread Rustom Mody
On Wednesday, June 15, 2016 at 7:21:54 PM UTC+5:30, Random832 wrote: > On Wed, Jun 15, 2016, at 07:19, Rustom Mody wrote: > > I thought there'd be many examples for showing that break is just goto in > > disguise... Evidently not > > > > So here is an example in more

Re: for / while else doesn't make sense

2016-06-15 Thread Rustom Mody
On Wednesday, June 15, 2016 at 7:21:54 PM UTC+5:30, Random832 wrote: > On Wed, Jun 15, 2016, at 07:19, Rustom Mody wrote: > > I thought there'd be many examples for showing that break is just goto in > > disguise... Evidently not > > > > So here is an example in more

Re: for / while else doesn't make sense

2016-06-15 Thread Rustom Mody
On Wednesday, June 15, 2016 at 5:57:51 PM UTC+5:30, BartC wrote: > On 15/06/2016 12:19, Rustom Mody wrote: > > On Wednesday, June 15, 2016 at 8:42:33 AM UTC+5:30, Steven D'Aprano wrote: > > >> Sort of. A break is a jump, and a goto is a jump, but apart from that, > >&g

Re: for / while else doesn't make sense

2016-06-15 Thread Rustom Mody
On Wednesday, June 15, 2016 at 8:42:33 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 15 Jun 2016 01:33 am, Rustom Mody wrote: > > > On Tuesday, June 14, 2016 at 8:13:53 AM UTC+5:30, Steven D'Aprano wrote: > >> No. The sun exploding was me gently mocking you for your c

Re: for / while else doesn't make sense

2016-06-14 Thread Rustom Mody
On Wednesday, June 15, 2016 at 8:42:33 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 15 Jun 2016 01:33 am, Rustom Mody wrote: > > > On Tuesday, June 14, 2016 at 8:13:53 AM UTC+5:30, Steven D'Aprano wrote: > >> No. The sun exploding was me gently mocking you for your c

Re: for / while else doesn't make sense

2016-06-14 Thread Rustom Mody
On Wednesday, June 15, 2016 at 4:58:05 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Wednesday, June 15, 2016 at 3:34:14 AM UTC+12, Rustom Mody wrote: > > > And break is a euphemism for goto > > Is this the old > “structured-programming-is-mathematically-equivalent-to-gotos”

Re: for / while else doesn't make sense

2016-06-14 Thread Rustom Mody
On Tuesday, June 14, 2016 at 8:13:53 AM UTC+5:30, Steven D'Aprano wrote: > No. The sun exploding was me gently mocking you for your comment disputing > the "unconditional" part. Yes, you are technically right that technically > the "else" block will only run if no "break" is reached, and no

Re: Conversion: execfile --> exec

2016-06-13 Thread Rustom Mody
On Monday, June 13, 2016 at 10:48:33 PM UTC+5:30, Michael Selik wrote: > On Mon, Jun 13, 2016, 10:36 AM Rustom Mody wrote: > > > On Monday, June 13, 2016 at 7:41:33 PM UTC+5:30, MRAB wrote: > > > On 2016-06-13 14:24, Long Yang wrote: > > > > The p

Re: Conversion: execfile --> exec

2016-06-13 Thread Rustom Mody
On Monday, June 13, 2016 at 7:41:33 PM UTC+5:30, MRAB wrote: > On 2016-06-13 14:24, Long Yang wrote: > > The python 2.x command is as following: > > --- > > info = {} > > execfile(join('chaco', '__init__.py'), info) > > -- > > > > But execfile

Re: for / while else doesn't make sense

2016-06-12 Thread Rustom Mody
On Monday, June 13, 2016 at 7:42:25 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 13 Jun 2016 04:44 am, Michael Selik wrote: > > > On Sun, Jun 12, 2016 at 6:11 AM Steven D'Aprano wrote: > > > >> - run the for block > >> - THEN unconditionally run the "else" block > >> > > > > Saying

Re: I'm wrong or Will we fix the ducks limp?

2016-06-08 Thread Rustom Mody
On Wednesday, June 8, 2016 at 4:32:33 PM UTC+5:30, Antoon Pardon wrote: > It means that if you mutate the object through one variable, > you can see the result of that mutation through the other variable. But if the > assignment doesn't mutate, you can't have such effect through assignment. >

Re: Operator precedence problem

2016-06-06 Thread Rustom Mody
On Monday, June 6, 2016 at 7:27:18 PM UTC+5:30, Random832 wrote: > On Mon, Jun 6, 2016, at 01:46, Lawrence D’Oliveiro wrote: > > On Monday, June 6, 2016 at 4:06:20 AM UTC+12, Uri Even-Chen wrote: > > > Never write expressions, such as 2 ** 3 ** 2 or even 2 * 4 > > > + 5, without parentheses. > >

Re: Lineendings (was Everything good about Python except GUI IDE?)

2016-06-05 Thread Rustom Mody
Just came across this new data (for me) to this old question: On Monday, February 29, 2016 at 8:05:33 AM UTC+5:30, Ben Finney wrote: > Rustom Mody writes: > > > On Monday, February 29, 2016 at 7:33:18 AM UTC+5:30, Chris Angelico wrote: > > > Never has for any of my proj

Re: Coding systems are political (was Exended ASCII and code pages)

2016-06-04 Thread Rustom Mody
On Monday, May 30, 2016 at 12:16:55 AM UTC+5:30, Terry Reedy wrote: > On 5/29/2016 2:12 AM, Rustom Mody wrote: > > > In short that a € costs more than a $ is a combination of the factors > > - a natural cause -- there are a million chars to encode (lets assume that > > th

Re: Coding systems are political (was Exended ASCII and code pages)

2016-05-29 Thread Rustom Mody
On Sunday, May 29, 2016 at 11:07:51 AM UTC+5:30, Steven D'Aprano wrote: > On Sat, 28 May 2016 02:46 pm, Rustom Mody wrote: > > [...] > > In idealized, simplified models like Turing models where > > 3 is 111 > > 7 is 111 > > 100, 8364 etc I wont try to write bu

Coding systems are political (was Exended ASCII and code pages)

2016-05-27 Thread Rustom Mody
On Friday, May 27, 2016 at 9:39:19 PM UTC+5:30, Random832 wrote: > On Fri, May 27, 2016, at 11:53, Rustom Mody wrote: > > And coding systems are VERY political. > > Sure what characters are put in (and not) is political > > But more invisible but equally political i

Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense]

2016-05-27 Thread Rustom Mody
On Saturday, May 28, 2016 at 12:34:14 AM UTC+5:30, Marko Rauhamaa wrote: > Random832 : > > > On Fri, May 27, 2016, at 05:56, Steven D'Aprano wrote: > >> On Fri, 27 May 2016 05:04 pm, Marko Rauhamaa wrote: > >> > They are all ASCII derivatives. Those that aren't don't exist. > >> *plonk* > > > >

Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense]

2016-05-27 Thread Rustom Mody
On Friday, May 27, 2016 at 7:21:41 PM UTC+5:30, Random832 wrote: > On Fri, May 27, 2016, at 05:56, Steven D'Aprano wrote: > > On Fri, 27 May 2016 05:04 pm, Marko Rauhamaa wrote: > > > > > They are all ASCII derivatives. Those that aren't don't exist. > > > > *plonk* > > That's a bit harsh,

Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense]

2016-05-26 Thread Rustom Mody
On Thursday, May 26, 2016 at 1:41:41 PM UTC+5:30, Erik wrote: > On 26/05/16 02:28, Dennis Lee Bieber wrote: > > On Wed, 25 May 2016 22:03:34 +0100, Erik > > declaimed the following: > > > >> Indeed - at that time, I was working with COBOL on an IBM S/370. On that > >> system, we used EBCDIC ASCII.

Re: for / while else doesn't make sense

2016-05-26 Thread Rustom Mody
On Thursday, May 26, 2016 at 12:24:28 PM UTC+5:30, Jussi Piitulainen wrote: > Rustom Mody writes: > > > On Wednesday, May 25, 2016 at 4:18:02 PM UTC+5:30, Marko Rauhamaa wrote: > ... > >> instead of ASCII, national 7-bit character set variants were being > >>

Re: Exended ASCII and code pages [was Re: for / while else doesn't make sense]

2016-05-26 Thread Rustom Mody
On Thursday, May 26, 2016 at 12:52:09 PM UTC+5:30, Jussi Piitulainen wrote: > UTF-16 ASCII is weird. Wierd. Probably all right in an environment that > is otherwise set to use UTF-16. In http://blog.languager.org/2015/03/whimsical-unicode.html are some examples of why UTF-16 is bug-inviting [

Re: ValueError: I/O operation on closed file

2016-05-26 Thread Rustom Mody
On Thursday, May 26, 2016 at 11:17:56 AM UTC+5:30, San wrote: > On Wednesday, May 25, 2016 at 6:00:07 PM UTC+5:30, San wrote: > > Hi Gorup, > > > > why i am getting "ValueError: I/O operation on closed file" this error. > > Pls let me know. > > > > Thanks in Advance. > > san > > Hello, >

Re: for / while else doesn't make sense

2016-05-25 Thread Rustom Mody
On Wednesday, May 25, 2016 at 4:18:02 PM UTC+5:30, Marko Rauhamaa wrote: > Christopher Reimer: > > > Back in the early 1980's, I grew up on 8-bit processors and latin-1 was > > all we had for ASCII. > > You really were very advanced. According to

When were real numbers born? (was for / while else doesn't make sense)

2016-05-23 Thread Rustom Mody
On Tuesday, May 24, 2016 at 4:10:59 AM UTC+5:30, Ian wrote: > On Mon, May 23, 2016 at 9:30 AM, Rustom Mody wrote: > > Yes the point is being missed but in a different direction: > > The SET (as a completed whole) of real numbers (ℝ) is no more than a 100 > > years > &g

Re: for / while else doesn't make sense

2016-05-23 Thread Rustom Mody
On Monday, May 23, 2016 at 7:59:47 PM UTC+5:30, Ben Bacarisse wrote: > Ian Kelly writes: > > > On Mon, May 23, 2016 at 2:09 AM, Steven D'Aprano wrote: > >> Are you saying that the Egyptians, Babylonians and Greeks didn't know how > >> to > >> work with fractions? > >> > >>

Re: RFC: name for project of a cross version disassembler, and unmarshal program

2016-05-23 Thread Rustom Mody
On Monday, May 23, 2016 at 1:38:41 PM UTC+5:30, rocky wrote: > On Monday, May 23, 2016 at 2:17:07 AM UTC-4, Pete Forman wrote: > > rocky writes: > > > > > I'm looking for a good name for a relatively new project I'll put on pypy. > > > > > > I've been working on a module to disassemble Python

Re: for / while else doesn't make sense

2016-05-23 Thread Rustom Mody
On Monday, May 23, 2016 at 12:01:08 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > Haskell has (almost) what I learnt at school: > > > > Prelude> let (q,r) = 7 `divMod` 3 > > Prelude> (q,r) > > (2,1) > > Python: > >>>&

Re: for / while else doesn't make sense

2016-05-23 Thread Rustom Mody
On Monday, May 23, 2016 at 9:59:27 AM UTC+5:30, Ben Finney wrote: > Jon Ribbens writes: > > > OK, I'm bored of you now. You clearly are not willing to imagine > > a world beyond your own preconceptions. > > Steven has, in the message to which you responded, asked for you to > *describe* this

Re: for / while else doesn't make sense

2016-05-22 Thread Rustom Mody
On Sunday, May 22, 2016 at 10:55:43 PM UTC+5:30, Random832 wrote: > Values are more important than types. Types are less important than > values. A stronger version that I occasionally tell my students: Values are in reality Types are in our heads Unfortunately we only know how to think thoughts

Re: for / while else doesn't make sense

2016-05-22 Thread Rustom Mody
On Sunday, May 22, 2016 at 10:20:11 PM UTC+5:30, Jon Ribbens wrote: > On 2016-05-22, Chris Angelico wrote: > > Python's int and float types are both approximations to a > > non-representable type called a "real number". > > Sorry, I have to stop you there as the entire premise of your post is >

Re: for / while else doesn't make sense

2016-05-22 Thread Rustom Mody
On Sunday, May 22, 2016 at 8:28:39 PM UTC+5:30, Marko Rauhamaa wrote: > Python ought to be the perfect language for seasoned experts. It doesn't > need to be dumbed down for noobs. There's a language you may have heard of that you'll LOVE -- C++ Or maybe Haskell On a somewhat more serious note:

Re: for / while else doesn't make sense

2016-05-20 Thread Rustom Mody
On Saturday, May 21, 2016 at 1:51:19 AM UTC+5:30, Christopher Reimer wrote: > On 5/20/2016 8:59 AM, Zachary Ware wrote: > > > On Fri, May 20, 2016 at 3:09 AM, Erik wrote: > >> On 20/05/16 00:51, Gregory Ewing wrote: > >>> It's not so bad with "else" because you need to look back > >>> to find

Re: Resources/pointers for writing maintable, testable Python

2016-05-18 Thread Rustom Mody
On Thursday, May 19, 2016 at 9:26:39 AM UTC+5:30, Steven D'Aprano wrote: > On Thursday 19 May 2016 13:31, Rustom Mody wrote: > > > On Thursday, May 19, 2016 at 6:26:26 AM UTC+5:30, Ben Finney wrote: > > >> Code Like A Pythonista was written in the Python 2 era > >

Re: Resources/pointers for writing maintable, testable Python

2016-05-18 Thread Rustom Mody
On Thursday, May 19, 2016 at 6:26:26 AM UTC+5:30, Ben Finney wrote: > Jacob Scott writes: > > > Today, I'm happily writing primarily Python (unfortunately, 2.7 -- but I'm > > not sure it makes that much of a difference) > > Python 2.7 is still viable, but is certainly a dead end. The difference

Re: setrecursionlimit

2016-05-18 Thread Rustom Mody
On Thursday, May 19, 2016 at 3:13:44 AM UTC+5:30, bream wrote: > On Wednesday, May 18, 2016 at 6:47:42 PM UTC+1, Chris Kaynor wrote: > > On Wed, May 18, 2016 at 10:15 AM, Steven D'Aprano wrote: > > > > > I don't really understand why the system can't track the current top of > > > the > > >

Re: Distinction between “class” and “type”

2016-05-12 Thread Rustom Mody
On Friday, May 13, 2016 at 10:37:34 AM UTC+5:30, Ben Finney wrote: > Howdy all, > > Ever since Python's much-celebrated Grand Unification of classes and > types, I have used those terms interchangeably: every class is a type, > and every type is a class. > > That may be an unwise conflation.

Re: Average calculation Program *need help*

2016-05-12 Thread Rustom Mody
On Thursday, May 12, 2016 at 9:18:08 PM UTC+5:30, Jake Kobs wrote: > Hello all, I have been struggling with this code for 3 hours now and I'm > still stumped. My problem is that when I run the following code: > -- > #this

Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?

2016-05-10 Thread Rustom Mody
On Tuesday, May 10, 2016 at 9:46:45 PM UTC+5:30, DFS wrote: > On 5/9/2016 3:53 AM, Steven D'Aprano wrote: > > On Monday 09 May 2016 09:10, DFS wrote: > > > >> sSQL = "line 1\n" > >> sSQL += "line 2\n" > >> sSQL += "line 3" > > > > Pointlessly provocative subject line edited. > > > huh? You

Re: json.loads(...) ValueError: Expecting value: line 1 column 1 (char 0)

2016-05-09 Thread Rustom Mody
On Tuesday, May 10, 2016 at 7:43:17 AM UTC+5:30, Steven D'Aprano wrote: > On Tue, 10 May 2016 09:07 am, Terry Reedy wrote: > > > Editorial: Programming classes should teach basic debugging better. I > > have seen numerous newbie Stackoverflow questions where the person > > should have started

Re: String concatenation

2016-05-09 Thread Rustom Mody
On Tuesday, May 10, 2016 at 2:52:13 AM UTC+5:30, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > > > On Mon, May 9, 2016 at 10:44 AM, Thomas 'PointedEars' Lahn wrote: > >> Also, it would be a good idea if you posted under your real name. > >> Internet is the thing with cables; Usenet

Re: Python PygLatin

2016-05-09 Thread Rustom Mody
On Sunday, May 8, 2016 at 3:52:12 PM UTC+5:30, Cai Gengyang wrote: > I just "clicked" through the lesson on Conditionals and Control Flows and am > on the lesson "PygLatin" . > > This will hopefully be a more interesting and interactive lesson because I > will be building a PygLatin Translator

Re: Python is an Equal Opportunity Programming Language

2016-05-08 Thread Rustom Mody
On Sunday, May 8, 2016 at 5:38:18 PM UTC+5:30, Steven D'Aprano wrote: > On Sun, 8 May 2016 01:57 am, Marko Rauhamaa wrote: > > > A functional, enlightened, prosperous democracy is a very recent > > historical anomaly. You don't want to jeopardize it naïvely. > > Perhaps by implementing

Re: Python is an Equal Opportunity Programming Language

2016-05-07 Thread Rustom Mody
On Saturday, May 7, 2016 at 12:13:59 PM UTC+5:30, Gregory Ewing wrote: > Steven D'Aprano wrote: > > Who is setting and enforcing this quota, and given that only about 1 in 20 > > Python programmers is a woman, do you think men are seriously missing out > > on any opportunities? > > Suppose there

Re: After a year using Node.js, the prodigal son returns

2016-05-06 Thread Rustom Mody
On Friday, May 6, 2016 at 8:23:27 AM UTC+5:30, Chris Angelico wrote: > On Fri, May 6, 2016 at 12:49 PM, Michael Torrie wrote: > > On 05/04/2016 02:59 AM, Steven D'Aprano wrote > >> A year ago, Gavin Vickery decided to move away from Python and give > >> Javascript with Node.js a try. Twelve

Re: How to fill in abbreviation in one column based on state name in another column?

2016-05-01 Thread Rustom Mody
Your code (below) is too garbled to be able to read On Monday, May 2, 2016 at 12:00:59 AM UTC+5:30, David Shi wrote: > Hello, I am back.  Thank you very much for your positive response. > I am trying to use Pandas apply to execute a lookup function, so that we can > put abbreviation in a new

Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

2016-04-30 Thread Rustom Mody
On Saturday, April 30, 2016 at 9:36:42 AM UTC+5:30, Paul Rubin wrote: > Rustom Mody writes: > > As with all things rms, its taking him decades to realize this defeat > > [Latest makeinfo is 18 times slower than previous version!! > > https://lists.gnu.org/archive/html/bug-tex

Re: What should Python apps do when asked to show help?

2016-04-29 Thread Rustom Mody
On Saturday, April 30, 2016 at 9:46:19 AM UTC+5:30, Random832 wrote: > On Sat, Apr 30, 2016, at 00:06, Ben Finney wrote: > > Steven D'Aprano writes: > > > > > So they want the PAGER environment variable to specify what pager they > > > want... > > > > > > ...so long as applications don't

Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

2016-04-29 Thread Rustom Mody
On Saturday, April 30, 2016 at 7:55:47 AM UTC+5:30, Ben Finney wrote: > "Martin A. Brown" writes: > > > Hello [Steven D'Aprano], > > > > >What is a good place where I can find out more about writing manpage? > > Writing them directly in GNU troff markup is easy enough >

Re: What should Python apps do when asked to show help?

2016-04-29 Thread Rustom Mody
On Saturday, April 30, 2016 at 8:06:46 AM UTC+5:30, Random832 wrote: > On Fri, Apr 29, 2016, at 22:27, Rustom Mody wrote: > > On Saturday, April 30, 2016 at 7:47:11 AM UTC+5:30, Random832 wrote: > > > On Fri, Apr 29, 2016, at 22:09, Ethan Furman wrote: > > > > So I h

Re: What should Python apps do when asked to show help?

2016-04-29 Thread Rustom Mody
On Saturday, April 30, 2016 at 7:47:11 AM UTC+5:30, Random832 wrote: > On Fri, Apr 29, 2016, at 22:09, Ethan Furman wrote: > > So I have to cripple my shell to get pydoc help to work nicely? Neat! > > Actually, not so much. :( > > If you don't want a pager with pydoc, when exactly do you want

Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

2016-04-29 Thread Rustom Mody
On Friday, April 29, 2016 at 7:35:55 PM UTC+5:30, Ethan Furman wrote: > Wow. Thank you for that very informative post! > > -- > ~Ethan~ For emacs junkies there is also org-e-man [1] http://orgmode.org/worg/org-tutorials/org-e-man-documentation.html [2]

Re: What should Python apps do when asked to show help?

2016-04-29 Thread Rustom Mody
On Friday, April 29, 2016 at 3:07:09 PM UTC+5:30, Steven D'Aprano wrote: > On Fri, 29 Apr 2016 03:00 pm, Rustom Mody wafted information-rich pheromones > into the air, where they diffused rapidly: > > Why replicate and cause annoyance? > > If you don't want to use the function

Re: What should Python apps do when asked to show help?

2016-04-28 Thread Rustom Mody
On Friday, April 29, 2016 at 7:45:35 AM UTC+5:30, Paul Rubin wrote: > Steven D'Aprano writes: > > (1) print the help text to stdout; > > (2) run the help text through a pager; > > Stdout unless the PAGER env var is set. Otherwise, I'd say still stdout > since the person can pipe it through a

Re: online python courses

2016-04-28 Thread Rustom Mody
On Thursday, April 28, 2016 at 7:45:22 PM UTC+5:30, ldomp...@casema.nl wrote: > I am follows on this moment two online pythoncourses from code.tutsplus.com > But I am interested in following more online pythoncourses. > Maby someone have some links to websites for me what handles python online >

Re: Controlling the passing of data

2016-04-28 Thread Rustom Mody
On Thursday, April 28, 2016 at 8:11:26 PM UTC+5:30, Dan Strohl wrote: > In addition to Peter's points, > - I would suggest breaking out the list comprehensions into standard for > loops and/or functions. That makes it easier to read and troubleshoot. (you > can always re-optimize It if

Dunder docs again (was Pythonic style)

2016-04-28 Thread Rustom Mody
On Thursday, April 28, 2016 at 4:46:43 PM UTC+5:30, MRAB wrote: > On 2016-04-28 06:16, Rustom Mody wrote: > > On Thursday, April 28, 2016 at 9:26:21 AM UTC+5:30, Chris Angelico wrote: > >> My rule of thumb is: Dunders are for defining, not for calling. It's > >> not a ha

Re: Dictionary is really not easy to handle

2016-04-28 Thread Rustom Mody
On Thursday, April 28, 2016 at 1:57:40 PM UTC+5:30, jf...@ms4.hinet.net wrote: > I have a dictionary like this: > > >>> dct ={1: 'D', 5: 'A', 2: 'B', 3: 'B', 4: 'E'} > > The following code works: > > >>> for k in dct: print(k, dct[k]) > ... > 1 D > 2 B > 3 B > 4 E > 5 A > > and this one too: >

Re: Pythonic style

2016-04-27 Thread Rustom Mody
On Thursday, April 28, 2016 at 9:26:21 AM UTC+5:30, Chris Angelico wrote: > My rule of thumb is: Dunders are for defining, not for calling. It's > not a hard-and-fast rule, but it'll get you through 99%+ of > situations. Neat and clever. Should get in the docs somewhere --

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Wednesday, April 20, 2016 at 6:33:33 AM UTC+5:30, Steven D'Aprano wrote: > Anyone who thinks that we're heading back to hieroglyphics simply isn't > paying attention. Which are just text in the range 13000-1342F: http://unicode.org/charts/PDF/U13000.pdf --

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Wednesday, April 20, 2016 at 12:25:09 AM UTC+5:30, Random832 wrote: > On Tue, Apr 19, 2016, at 13:43, Tim Chase wrote: > > Well, let's take a look at their native file formats: > > > > Inkscape: SVG > > > > Libreoffice: compressed XML > > > > Firefox: HTML+CSS+JS > > > > Musescore:

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 11:17:23 PM UTC+5:30, Tim Chase wrote: > On 2016-04-19 09:46, Rustom Mody wrote: > > inkscape > > gimp > > blender > > libreoffice writer/calc/prese > > wireshark > > skype > > firefox > > audacity > > musesc

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 9:44:39 PM UTC+5:30, Steven D'Aprano wrote: > On Tue, 19 Apr 2016 01:04 pm, Rustom Mody wrote: > > > And more generally that programmers sticking to text when rest of world > > has moved on is rather backward: > > I'm pretty sure that t

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 7:46:21 PM UTC+5:30, Grant Edwards wrote: > On 2016-04-19, Pete Forman wrote: > > > My question asks why monospace is used for the text. > > Well, I always use a monospaced font for code because I find it helps > readability for things like tables of data, block

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 7:30:18 PM UTC+5:30, Tim Chase wrote: > On 2016-04-19 04:37, Rustom Mody wrote: > > > No, they will not, because they'll make your code proprietary. > > > > Pragmatically yes; theoretically no because its like saying > > "

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 9:41:24 AM UTC+5:30, Random832 wrote: > On Mon, Apr 18, 2016, at 23:54, Rustom Mody wrote: > > Start no tabs: > > if foo# comment that is aligned > > do some stuff# across multiple indent levels > > > > Add tabs as leading indent

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 5:18:07 PM UTC+5:30, Marko Rauhamaa wrote: > Paul Rudin : > > > Pete Forman writes: > >> Why is it that Python continues to use a fixed width font and > >> therefore specifies the maximum line width as a character count? > > > > Python doesn't require the use of any

Re: Guido sees the light: PEP 8 updated

2016-04-19 Thread Rustom Mody
On Tuesday, April 19, 2016 at 1:47:48 PM UTC+5:30, Chris Angelico wrote: > On Tue, Apr 19, 2016 at 6:09 PM, Marko Rauhamaa wrote: > > Now, descending back on earth, I don't believe the advantages of rich > > source code will outweigh those of plain text in the foreseeable future. > > No, they

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Rustom Mody
On Tuesday, April 19, 2016 at 9:00:12 AM UTC+5:30, Random832 wrote: > On Mon, Apr 18, 2016, at 23:04, Rustom Mody wrote: > > See elastic tabstops: http://nickgravgaard.com/elastic-tabstops/ > > >From there: > >A column block is a run of uninterrupted vertically ad

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Rustom Mody
On Tuesday, April 19, 2016 at 6:49:34 AM UTC+5:30, sohcatoa wrote: > On Monday, April 18, 2016 at 2:14:17 PM UTC-7, Pete Forman wrote: > > Why is it that Python continues to use a fixed width font and therefore > > specifies the maximum line width as a character count? > > > > An essential part

Re: Guido sees the light: PEP 8 updated

2016-04-18 Thread Rustom Mody
On Monday, April 18, 2016 at 2:34:10 PM UTC+5:30, Gregory Ewing wrote: > Rustom Mody wrote: > > Come to think of it take an SQL DBMS browser. > > Should we say: Horizontal scrolls are BAD; just reformat the table after > > reaching 80 columns? > > I would say, yes, ho

Re: Guido sees the light: PEP 8 updated

2016-04-17 Thread Rustom Mody
On Sunday, April 17, 2016 at 3:34:56 PM UTC+5:30, BartC wrote: > On 17/04/2016 04:44, Rustom Mody wrote: > > On Saturday, April 16, 2016 at 10:22:10 PM UTC+5:30, Marko Rauhamaa wrote: > > >> It comes with the maxim that one function must be visible at once on the >

Re: Guido sees the light: PEP 8 updated

2016-04-17 Thread Rustom Mody
On Monday, April 18, 2016 at 8:49:33 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 18 Apr 2016 11:39 am, Rustom Mody wrote: > > > yes we can agree on this -- arbitrary line lengths are almost certainly > > unreadable. > > The problem then becomes so what is optimal? &

Re: Guido sees the light: PEP 8 updated

2016-04-17 Thread Rustom Mody
On Sunday, April 17, 2016 at 9:19:48 AM UTC+5:30, Chris Angelico wrote: > On Sun, Apr 17, 2016 at 1:44 PM, Rustom Mody wrote: > > Thats a strange self-contradiction. I wrote this: > > http://blog.languager.org/2012/10/layout-imperative-in-functional.html > > to make the ca

Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Rustom Mody
On Saturday, April 16, 2016 at 10:22:10 PM UTC+5:30, Marko Rauhamaa wrote: > Larry Martell : > > > I have worked for many companies where you are required to get a clean > > run of pep8 on your code before your pull request will even be > > considered for approval. I don't agree with this at all,

Re: [OT] A doubt about a doubt, was Re: How to XOR a byte output?

2016-04-13 Thread Rustom Mody
On Wednesday, April 13, 2016 at 10:30:07 PM UTC+5:30, Peter Otten wrote: > alister wrote: > > > On Wed, 13 Apr 2016 06:18:22 -0700, durgadevi1 wrote: > > > >> I have a doubt regarding a problem. > >> > > No, you have a question doubt means you don't believe something > > (sorry I know this is

<    1   2   3   4   5   6   7   8   9   10   >