Re: Program outlining

2016-07-11 Thread Rustom Mody
On Monday, July 11, 2016 at 6:26:01 PM UTC+5:30, Rustom Mody wrote: > Ive been trying to figure out the best outlining that emacs can give for > programs. Oops sorry! Wrong list!! -- https://mail.python.org/mailman/listinfo/python-list

Re: Program outlining

2016-07-13 Thread Rustom Mody
On Monday, July 11, 2016 at 6:27:05 PM UTC+5:30, Rustom Mody wrote: > On Monday, July 11, 2016 at 6:26:01 PM UTC+5:30, Rustom Mody wrote: > > Ive been trying to figure out the best outlining that emacs can give for > > programs. > > Oops sorry! Wrong list!! Couple of peo

Re: Were is a great place to Share your finished projects?

2016-07-13 Thread Rustom Mody
On Wednesday, July 13, 2016 at 10:42:01 AM UTC+5:30, Chris Angelico wrote: > On Wed, Jul 13, 2016 at 2:42 PM, Ben Finney wrote: > > Chris Angelico writes: > > > >> On Wed, Jul 13, 2016 at 11:28 AM, Ben Finney wrote: > >> > Pull requests. Code review. Issues. Integration with other services. > >>

Re: Clean Singleton Docstrings

2016-07-15 Thread Rustom Mody
On Thursday, July 14, 2016 at 5:24:50 AM UTC+5:30, Peter Otten wrote: > Lawrence D’Oliveiro wrote: > > And there are still those who think that Python’s lax acceptance of > > non-boolean values as booleans is a good idea... > > I don't think this particular problem serves as an argument for strict

Re: Operator Precedence/Boolean Logic

2016-07-15 Thread Rustom Mody
On Thursday, June 30, 2016 at 10:52:50 PM UTC+5:30, Steven D'Aprano wrote: > Okay, if you think that automata cannot be empty, I'll accept that. In that > case, then I'll change my answer and say that __bool__ for automata should > simply return True. All automata should be truthy. > I am not sur

Re: Clean Singleton Docstrings

2016-07-15 Thread Rustom Mody
On Saturday, July 16, 2016 at 9:50:13 AM UTC+5:30, Ethan Furman wrote: > On 07/15/2016 09:04 PM, Rustom Mody wrote: > > > Just that suggesting that python's bool notion is straightforward is an > > unnecessary lie – especially to newbies. > > Python's boole

Re: Operator Precedence/Boolean Logic

2016-07-15 Thread Rustom Mody
From other thread: On Saturday, July 16, 2016 at 9:50:13 AM UTC+5:30, Ethan Furman wrote: > On 07/15/2016 09:04 PM, Rustom Mody wrote: > > > Just that suggesting that python's bool notion is straightforward is an > > unnecessary lie – especially to newbies. > > P

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Rustom Mody
Earlier you said: > > 1. Graphs -- the kind mathematicians define with "Let G =(V,E) be a > > graph..." > > I would make the empty graph (zero nodes) falsey, and non-empty graphs (one > or more nodes) truthy. > > > > 2. Automata which in a way are special kinds of graphs > > As above. No

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Rustom Mody
On Saturday, July 16, 2016 at 4:16:34 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 16, 2016 at 8:16 PM, Steven D'Aprano wrote: > >> If both you and Chris tripped up on a right definition of an “empty” > >> automaton and regex respectively, I believe it demonstrates that getting > >> boolishnes

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Rustom Mody
Heh! A flurry of opinions! No time right now… other than to say thank you (MRAB) for this little gem: On Saturday, July 16, 2016 at 10:29:02 PM UTC+5:30, MRAB wrote: > On 2016-07-16 17:27, Steven D'Aprano wrote: > > On Sat, 16 Jul 2016 10:33 pm, Rustom Mody wrote: > [snip] >

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Rustom Mody
On Sunday, July 17, 2016 at 9:35:57 AM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 17, 2016 at 1:43 PM, Rustom Mody wrote: > > Heh! A flurry of opinions! > > No time right now… other than to say thank you (MRAB) for this little gem: > > > > On Saturday, July 16, 2

Re: Operator Precedence/Boolean Logic

2016-07-17 Thread Rustom Mody
On Sunday, July 17, 2016 at 12:15:40 PM UTC+5:30, Rustom Mody wrote: > On Sunday, July 17, 2016 at 9:35:57 AM UTC+5:30, Chris Angelico wrote: > > On Sun, Jul 17, 2016 at 1:43 PM, Rustom Mody wrote: > > > Heh! A flurry of opinions! > > > No time right now… other than

Re: PEP Request: Advanced Data Structures

2016-07-17 Thread Rustom Mody
On Sunday, July 17, 2016 at 3:45:04 AM UTC+5:30, Shrey Desai wrote: > I have found it slightly frustrating that Python does not have built-in > support for advanced data structures (Linked Lists, Stacks/Queues, BST) in > its distribution. Many computer science students, developers, and software

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Rustom Mody
On Sunday, July 17, 2016 at 2:56:53 PM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 17, 2016 at 7:19 PM, wrote: > > wf = wave.open(“test.wav”, “rb”) > > Watch your quotes. They want to be flat quotes, U+0022 "this sort", > not any sort of typographical quote. > > Recommendation: Use a programm

Re: Operator Precedence/Boolean Logic

2016-07-17 Thread Rustom Mody
On Sunday, July 17, 2016 at 4:32:36 PM UTC+5:30, Steven D'Aprano wrote: > On Sun, 17 Jul 2016 04:44 pm, Rustom Mody wrote: > > > My earlier statement (with emphasis in original): > >> You also have a bizarre notion that python's property: “Everything has > >&

What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-17 Thread Rustom Mody
On Saturday, July 16, 2016 at 3:16:48 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 16 Jul 2016 04:53 pm, Random832 wrote: > > > Eliminate both of them. Move to a single abstract numeric type* a la > > Scheme, with an "inexact" attribute (inexact numbers may or may not be > > represented by a floa

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-17 Thread Rustom Mody
On Monday, July 18, 2016 at 10:16:58 AM UTC+5:30, Ben Finney wrote: > You will be able to express yourself much more clearly on this topic > when you cease conflating a number with measurements of that number, or > conflating a number with representations of that number. > That more or less sums

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-17 Thread Rustom Mody
On Monday, July 18, 2016 at 10:06:11 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 18, 2016 at 2:16 PM, Rustom Mody wrote: > > On Saturday, July 16, 2016 at 3:16:48 PM UTC+5:30, Steven D'Aprano wrote: > > Here are the first couple of hits it gives (me) for “scheme exact numb

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Monday, July 18, 2016 at 2:59:56 PM UTC+5:30, Steven D'Aprano wrote: > On Monday 18 July 2016 14:16, Rustom Mody wrote: > > AIUI… > > There are two almost completely unrelated notions of exact > > > > 1. ⅓ in decimal cannot be exactly represented though 0.3

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Monday, July 18, 2016 at 3:45:26 PM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 18, 2016 at 8:00 PM, Marko Rauhamaa wrote: > > Python programmers (among others) frequently run into issues with > > surprising results in floating-point arithmetics. For better or worse, > > Scheme has tried to a

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Tuesday, July 19, 2016 at 12:28:36 AM UTC+5:30, Marko Rauhamaa wrote: > Ian Kelly : > > > Okay, so how is that wavelength defined? > > > > If you needed to mark a meter stick, and all you had was the > > definition of c and the second, how would you do it without measuring > > anything? > > I

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Tuesday, July 19, 2016 at 8:46:44 AM UTC+5:30, Steven D'Aprano wrote: > On Tue, 19 Jul 2016 10:36 am, Rustom Mody wrote: > > > I recollect — school physics textbook so sorry no link — > > that in the Newton gravitation law > > f = -GMm/r² > > > > there

Re: What exactly is "exact" (was Clean Singleton Docstrings)

2016-07-18 Thread Rustom Mody
On Tuesday, July 19, 2016 at 9:12:57 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 18 Jul 2016 08:15 pm, Chris Angelico wrote: > > > On Mon, Jul 18, 2016 at 8:00 PM, Marko Rauhamaa wrote: > >> Python programmers (among others) frequently run into issues with > >> surprising results in floating-poi

Re: Floating point equality [was Re: What exactly is "exact" (was Clean Singleton Docstrings)]

2016-07-20 Thread Rustom Mody
On Wednesday, July 20, 2016 at 11:13:05 AM UTC+5:30, Steven D'Aprano wrote: > On Tuesday 19 July 2016 14:58, Rustom Mody wrote: > > > So I again ask: You say «"Never compare floats for equality" is a pernicious > > myth» > > It is the word *never* whic

Re: Floating point equality [was Re: What exactly is "exact" (was Clean Singleton Docstrings)]

2016-07-20 Thread Rustom Mody
On Wednesday, July 20, 2016 at 8:29:25 PM UTC+5:30, Marko Rauhamaa wrote: > Chris Angelico : > > > On Wed, Jul 20, 2016 at 11:54 PM, Marko Rauhamaa wrote: > >> 2. Floating-point numbers are *imperfect approximations* of real > >> numbers. Even when real numbers are derived exactly, > >>

Re: Floating point equality [was Re: What exactly is "exact" (was Clean Singleton Docstrings)]

2016-07-20 Thread Rustom Mody
On Thursday, July 21, 2016 at 11:05:28 AM UTC+5:30, Chris Angelico wrote: > On Thu, Jul 21, 2016 at 3:28 PM, Rustom Mody wrote: > > ε is spelt ⎕ct (Comparison Tolerance) > > And of course == is spelt = > > spelt is spelled spelled. Unless, of course, you mean the wheat vari

Re: Floating point equality [was Re: What exactly is "exact" (was Clean Singleton Docstrings)]

2016-07-21 Thread Rustom Mody
On Thursday, July 21, 2016 at 12:04:35 PM UTC+5:30, Steven D'Aprano wrote: > On Thursday 21 July 2016 15:28, Rustom Mody wrote: > > BTW APL whose main domain of application is scientific chooses to enshrine > > this —equality is ε-neighborhood checking not exact equality che

Detecting the trivial can be non-trivial (was Why not allow empty code blocks?)

2016-07-23 Thread Rustom Mody
On Saturday, July 23, 2016 at 4:44:00 PM UTC+5:30, Marko Rauhamaa wrote: > Steven D'Aprano : > > > On Sat, 23 Jul 2016 01:33 am, Kent Tong wrote: > >> I'm aware that we can use 'pass' as an empty code block. But why > >> doesn't python allow a code block to be empty and thus eliminate the > >> nee

Re: Detecting the trivial can be non-trivial (was Why not allow empty code blocks?)

2016-07-24 Thread Rustom Mody
On Sunday, July 24, 2016 at 3:45:40 PM UTC+5:30, Ben Bacarisse wrote: > Rustom Mody writes: > > > For a long time the re → dfa transformation went and was taught the > > laborious > > route: > > re → nfa-with-ε-transitions → nfa-without-ε-transitions → dfa > &g

Re: Why not allow empty code blocks?

2016-07-24 Thread Rustom Mody
On Monday, July 25, 2016 at 1:33:48 AM UTC+5:30, BartC wrote: > On 24/07/2016 20:00, Chris Angelico wrote: > > On Mon, Jul 25, 2016 at 4:14 AM, BartC wrote: > > > A skilled craftsman in any field will choose to use quality tools. > > Materials (ie. languages) are important too. > > > So why do

Re: Can math.atan2 return INF?

2016-07-24 Thread Rustom Mody
On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > On Thursday 30 June 2016 12:13, Rustom Mody wrote: > > > In particular the question: "Are real numbers really real?" is where it > > starts off... http://blog.languager.org/2015/03/cs-hi

Re: Why not allow empty code blocks?

2016-07-24 Thread Rustom Mody
On Monday, July 25, 2016 at 8:42:21 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 25, 2016 at 12:48 PM, Michael Torrie wrote: > > Far more often I'm bitten by the dynamic nature of Python (would happen > > in any dynamic language). I'll be using a particular member attribute > > which I acciden

Re: Why not allow empty code blocks?

2016-07-24 Thread Rustom Mody
On Monday, July 25, 2016 at 8:59:10 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 25, 2016 at 1:20 PM, Rustom Mody wrote: > >> so ultimately, it all comes down to testing anyway. > > > > All?? > > > > There is a famous quote by Dijkstra: > > «Testing s

Re: Why not allow empty code blocks?

2016-07-25 Thread Rustom Mody
On Monday, July 25, 2016 at 7:15:36 AM UTC+5:30, Ben Finney wrote: > Even tools that have existed for 25 years have benefited from the > intervening time. No-one uses Emacs *as it was 25 years ago* and expects > to be as proficient as someone using Emacs as it is today. As a general comment — fine

Re: Why not allow empty code blocks?

2016-07-25 Thread Rustom Mody
On Monday, July 25, 2016 at 10:32:45 PM UTC+5:30, Chris Angelico wrote: > On Tue, Jul 26, 2016 at 2:54 AM, Rustom Mody wrote: > > The whole world uses cua keys: > > https://en.wikipedia.org/wiki/IBM_Common_User_Access > > [emacs] proudly sticks to what it was doing pre-cua &

Re: Why not allow empty code blocks?

2016-07-25 Thread Rustom Mody
On Monday, July 25, 2016 at 10:56:41 PM UTC+5:30, Chris Angelico wrote: > On Tue, Jul 26, 2016 at 3:11 AM, Rustom Mody wrote: > > On Monday, July 25, 2016 at 10:32:45 PM UTC+5:30, Chris Angelico wrote: > >> On Tue, Jul 26, 2016 at 2:54 AM, Rustom Mody wrote: > >> >

Re: Can math.atan2 return INF?

2016-07-29 Thread Rustom Mody
On Thursday, June 30, 2016 at 11:33:58 PM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jul 2016 01:28 am, Rustom Mody wrote: > > > On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > > > >> you state that Turing "believes in souls

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: > > Anyway, if you're going to talk about annoying things forced upon you by the > > language, what about: > > > > "()" in "print (x)" for Python 3 > > Why are you singling out

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 5:19:25 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 9:39 PM, Rustom Mody wrote: > > On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: > >> On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: > >> > A

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 5:53:12 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 10:11 PM, Rustom Mody wrote: > >> > - Poorer error catching: What was a straight syntax error is now a > >> > lint-catch (at best) > >> > [print (x) for x

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 8:17:19 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 30 Jul 2016 09:39 pm, Rustom Mody wrote: > > > On Saturday, July 30, 2016 at 4:56:01 PM UTC+5:30, Chris Angelico wrote: > >> On Sat, Jul 30, 2016 at 8:15 PM, BartC wrote: > >>

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 9:45:34 PM UTC+5:30, Rustom Mody wrote: > Ok Python is better than Java is better than C++ > But it cannot stand up to scheme as a teaching language > [The MIT Profs who replaced scheme by python admit to as much viz. Send pressed prematurely — Sorr

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 10:07:59 PM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 31, 2016 at 2:15 AM, Rustom Mody wrote: > > Diff between > > print "x" > > and > > print("x") > > is one char — the closing ‘)’ > > > > To

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 10:45:23 PM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 31, 2016 at 2:58 AM, Rustom Mody wrote: > >> Where, in any useful production code, is the difference between > >> functions and procedures actually helpful? Or where, in student code, >

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Sunday, July 31, 2016 at 7:07:45 AM UTC+5:30, Gregory Ewing wrote: > Michael Torrie wrote: > > Python would have been alright to teach "programming," but to > > teach the actual theory of programming languages (lambda calculus, lists > > as a foundation unit for all other data structures) > > I

Re: Float

2016-07-30 Thread Rustom Mody
On Saturday, July 30, 2016 at 5:21:44 PM UTC+5:30, Chris Angelico wrote: > On Sat, Jul 30, 2016 at 9:44 PM, Cai Gengyang wrote: > > You mentioned that : A floating point number[2] is number that is not an > > integer (and not a > > complex number) > > > > Hence , > > > > 10 is not a floating poin

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Sunday, July 31, 2016 at 8:44:13 AM UTC+5:30, Steven D'Aprano wrote: > It has always perplexed me that Lisp's prefix notation is held up as > the /sine qua non/ of elegance and power, while Forth is ignored if not > ridiculed. Forth is just as expressive as Lisp, just as meta, just as > customi

Re: Why not allow empty code blocks?

2016-07-30 Thread Rustom Mody
On Sunday, July 31, 2016 at 9:43:03 AM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 31, 2016 at 1:34 PM, Rustom Mody wrote: > > to > >> > teach the actual theory of programming languages (lambda calculus, lists > >> > as a foundation unit for all other data

Re: Procedures and functions [was Re: Why not allow empty code blocks?]

2016-07-30 Thread Rustom Mody
On Sunday, July 31, 2016 at 12:10:33 PM UTC+5:30, Steven D'Aprano wrote: > On Sun, 31 Jul 2016 02:01 pm, D'Arcy J.M. Cain wrote: > > > On Sun, 31 Jul 2016 13:32:16 +1000 > > Steven D'Aprano wrote: > >> Many beginners make the mistake of writing: > >> > >> mylist = mylist.sort() > >> > >> or try

Re: Can math.atan2 return INF?

2016-07-31 Thread Rustom Mody
On Monday, August 1, 2016 at 9:12:00 AM UTC+5:30, Paul Rubin wrote: > Steven D'Aprano writes: > > If Intuitionism influenced computer science, where is the evidence of this? > > Where are the Intuitionist computer scientists? > > Pretty much all of them, I thought. E.g. programs Yeah… Saying w

Re: Can math.atan2 return INF?

2016-07-31 Thread Rustom Mody
On Monday, August 1, 2016 at 8:23:49 AM UTC+5:30, Steven D'Aprano wrote: > On Sat, 30 Jul 2016 03:46 pm, Rustom Mody wrote: > > > Lots of questions... I would guess rhetorical. > > They weren't rhetorical. > > You've made a lot of claims about th

Re: Why not allow empty code blocks?

2016-08-02 Thread Rustom Mody
On Tuesday, August 2, 2016 at 4:01:25 PM UTC+5:30, Antoon Pardon wrote: > Op 30-07-16 om 18:15 schreef Rustom Mody: > > > > The more general baby that is significant is that beginners should have > > it easy to distinguish procedure and function and python does not naturally

Re: Why not allow empty code blocks?

2016-08-02 Thread Rustom Mody
> I think the real reason is not willing to admit that the language lacks > something that could actually be useful, and especially not to an > upstart on usenet who is not even an expert in that language. And earlier you said: > But dedicated forms (even if they just map to 'while' or 'for') wou

Re: Why not allow empty code blocks?

2016-08-03 Thread Rustom Mody
On Wednesday, August 3, 2016 at 12:53:02 AM UTC+5:30, Paul Rubin wrote: > Steven D'Aprano writes: > > where power is defined (rather fuzzily) as the expressiveness > > of the language, how easy it is for the programmer to read, write and > > maintain code, how efficient/fast you can implement it,

Re: Why not allow empty code blocks?

2016-08-03 Thread Rustom Mody
On Wednesday, August 3, 2016 at 1:57:43 PM UTC+5:30, Antoon Pardon wrote: > Op 02-08-16 om 14:29 schreef Rustom Mody: > > So I was talking of 3 very different levels: > > > > 1. print x vs print(x) > > — a difference too petty for me to waste my time with > >

Re: Why not allow empty code blocks?

2016-08-03 Thread Rustom Mody
On Wednesday, August 3, 2016 at 5:11:23 PM UTC+5:30, Steven D'Aprano wrote: > On Wednesday 03 August 2016 05:22, Paul Rubin wrote: > > >> The Halting Problem is easily solved for Bloop languages: they always > >> halt. > > > > If Bloop is powerful enough to "solve the halting problem" as you > >

Re: Why not allow empty code blocks?

2016-08-03 Thread Rustom Mody
On Wednesday, August 3, 2016 at 5:39:25 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > So yes scheme are python have similar underbellies but the culture of > > use is quite different. > > I don't know if there's enough Scheme activity out there to call

Re: Why not allow empty code blocks?

2016-08-03 Thread Rustom Mody
On Wednesday, August 3, 2016 at 5:53:44 PM UTC+5:30, Rustom Mody wrote: > On Wednesday, August 3, 2016 at 5:39:25 PM UTC+5:30, Marko Rauhamaa wrote: > > Rustom Mody : > > I don't know who or what you are referring to. > > I put it in the next line! > > > Sch

Re: Why not allow empty code blocks?

2016-08-03 Thread Rustom Mody
On Wednesday, August 3, 2016 at 6:08:08 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > Note: You CAN use python scheme-ishly but few people do that. > > eg here is SICP in python with the first examples pure useful powerful > > functions: > > http://www

Re: Python slang

2016-08-05 Thread Rustom Mody
On Saturday, August 6, 2016 at 8:16:36 AM UTC+5:30, Random832 wrote: > On Fri, Aug 5, 2016, at 20:14, Dennis Lee Bieber wrote: > > .push() tends to make this one think "stack" and not general purpose > > list. > > It's a bit unusual to have .pop() without a matching .push(). True… OTOH I tend

Out of line posts (was datetime vs Arrow vs Pendulum vs Delorean vs udatetime)

2016-08-06 Thread Rustom Mody
On Saturday, August 6, 2016 at 5:19:08 PM UTC+5:30, Mario R. Osorio wrote: > ... so you decided to start the post already hijacked by yourself ... > > very clever!! If you see https://mail.python.org/pipermail/python-list/2016-August/thread.html#start you will see that there was only one post th

Re: Python slang

2016-08-06 Thread Rustom Mody
On Sunday, August 7, 2016 at 1:25:43 AM UTC+5:30, Marco Sulla wrote: > On 6 August 2016 at 02:13, Chris Angelico wrote: > > On Sat, Aug 6, 2016 at 9:21 AM, Marco Sulla wrote: > >> I want to clarify that when I say "different from the other > >> languages", I mean "different from the most used langu

Re: Win32 API in pywin32

2016-08-06 Thread Rustom Mody
On Friday, August 5, 2016 at 5:29:37 PM UTC+5:30, Matt Wheeler wrote: > On Fri, 5 Aug 2016, 02:23 Lawrence D’Oliveiro, wrote: > > > On Friday, August 5, 2016 at 12:06:23 PM UTC+12, Igor Korot wrote: > > > > > > On Thu, Aug 4, 2016 at 4:57 PM, Lawrence D’Oliveiro wrote: > > >> On Friday, August 5,

Multi meaning of label: Doc bug

2019-02-26 Thread Rustom Mody
Ref: This stackexchange post: https://unix.stackexchange.com/q/503241/323121 Context: Theres this guy who's really struggling with disk partitioning LVM etc concepts. That point is not directly relevant to this question. My answer on that post tries to clarify that 'label' can mean 3 things at

Re: Multi meaning of label: Doc bug

2019-02-26 Thread Rustom Mody
On Wednesday, February 27, 2019 at 11:12:28 AM UTC+5:30, Rustom Mody wrote: > Ref: This stackexchange post: > https://unix.stackexchange.com/q/503241/323121 > > Context: Theres this guy who's really struggling with disk partitioning LVM > etc concepts. That point is not

Re: Google Groups + this list

2013-12-25 Thread Rustom Mody
On Thu, Dec 26, 2013 at 3:39 AM, wrote: > > On 12/25/2013 05:19 AM, Ned Batchelder wrote: > > On 12/24/13 8:47 PM, ru...@yahoo.com wrote: > >> On 12/23/2013 09:12 AM, Chris Angelico wrote: > >>> Also, > >>> you haven't answered the other part of the post, the more important > >>> part. > >> Refres

Re: Google Groups + this list

2013-12-25 Thread Rustom Mody
On Thu, Dec 26, 2013 at 9:47 AM, Chris Angelico wrote: > On Thu, Dec 26, 2013 at 3:11 PM, Ned Batchelder > wrote: >> Kevin started this thread by asking a question. Chris responded without >> helping the OP, and talked about Google Groups instead. That's not good. > > The only reason I didn't

Re: So, what's the real story on Python 2 vs Python 3?

2013-12-26 Thread Rustom Mody
On Fri, Dec 27, 2013 at 10:50 AM, Andrew Berg wrote: > On 2013.12.26 23:04, Travis McGee wrote: >> The Python.org site says that the future is Python 3, yet whenever I try >> something new in Python, such as Tkinter which I am learning now, >> everything seems to default to Python 2. By this I mea

Re: So, what's the real story on Python 2 vs Python 3?

2013-12-27 Thread Rustom Mody
On Fri, Dec 27, 2013 at 11:53 AM, Dan Stromberg wrote: > On Thu, Dec 26, 2013 at 9:43 PM, Rustom Mody wrote: >> 2. Always write strings with a u" prefix > 3.0, 3.1 and 3.2 don't understand this, but 3.3 does. Ok I was writing this under the assumption that 2 is really ent

Re: cascading python executions only if return code is 0

2013-12-27 Thread Rustom Mody
On Fri, Dec 27, 2013 at 10:12 PM, Roy Smith wrote: > In article , > Dennis Lee Bieber wrote: > >> On Thu, 26 Dec 2013 23:29:30 -0500, Roy Smith declaimed the >> following: >> >> > >> >NTP is never supposed to move the clock backwards. If your system clock >> >is fast, it's supposed to reduce th

Re: Python mange with liste

2013-12-28 Thread Rustom Mody
On Sun, Dec 29, 2013 at 5:00 AM, Bala Ji wrote: > Hello guys, > i need some help with is program > > I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) > example of txt file: > -- > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N

Re: Python mange with liste

2013-12-28 Thread Rustom Mody
On Sun, Dec 29, 2013 at 8:38 AM, Rustom Mody wrote: > Give up on file-IO, ie dont use the EXTERNAL file > > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N > nam1;F;N > > But ASSUME you have the internal python data structure > names = [

Re: Python mange with liste

2013-12-29 Thread Rustom Mody
On Sun, Dec 29, 2013 at 3:49 PM, Bala Ji wrote: > > > hello, > > thank you for your help > > i wrote this: > > x="nam1" > y="F" > > names = [("nam1", "F", "Y"), ("nam2", "M", "N")] > l = len(names) > for i in range(0,l): > print names[i][0] > print names[i][1] > if x == nam

Fwd: Mailing list erraticness

2013-12-31 Thread Rustom Mody
On Tue, Dec 31, 2013 at 10:03 AM, Ethan Furman wrote: > On 12/30/2013 08:25 PM, Devin Jeanpierre wrote: >> >> On Mon, Dec 30, 2013 at 2:38 PM, Ethan Furman wrote: >>> >>> Wow -- another steaming pile! Mark, are you going for a record? ;) >> >> >> Indeed. Every post that disagrees with my opinio

looking for a quote on age and technology

2013-12-31 Thread Rustom Mody
There is a quote which I vaguely remember seeing on this list. It went something like this: (yeah my rendering is poor) For a new technology: If you are a kid when it comes out, you just take it as a matter of course If you are a young adult, then it becomes a hot topic for discussion If you

Re: looking for a quote on age and technology

2013-12-31 Thread Rustom Mody
On Tue, Dec 31, 2013 at 10:30 PM, Rustom Mody wrote: > There is a quote which I vaguely remember seeing on this list. > It went something like this: (yeah my rendering is poor) > > For a new technology: > If you are a kid when it comes out, you just take it as a matter of course

Re: looking for a quote on age and technology

2013-12-31 Thread Rustom Mody
On Tue, Dec 31, 2013 at 10:40 PM, Joel Goldstick wrote: > > > On Tue, Dec 31, 2013 at 12:00 PM, Rustom Mody wrote: >> >> There is a quote which I vaguely remember seeing on this list. >> It went something like this: (yeah my rendering is poor) >> >> For

Re: About some problem

2014-01-02 Thread Rustom Mody
On Thu, Jan 2, 2014 at 10:23 PM, Joel Goldstick wrote: > > > > On Thu, Jan 2, 2014 at 11:31 AM, raj kumar wrote: >> >> Hello, I am beginner to python and i am writing following code >> >> from pytesser import * >> >> and i am getting an error as follow >> >> Traceback (most recent call last): >>

looking for a quote on age and technology

2014-01-02 Thread Rustom Mody
On Thu, Jan 2, 2014 at 11:22 AM, Ben Finney wrote: > I think you're referring to an article by the late, great Douglas Adams, > “How to Stop Worrying and Learn to Love the Internet”: Thanks Ben -- Yes thats the one I was looking for! -- https://mail.python.org/mailman/listinfo/python-list

Re: About some problem

2014-01-02 Thread Rustom Mody
On Thu, Jan 2, 2014 at 11:06 PM, Ned Batchelder wrote: > On 1/2/14 12:05 PM, Rustom Mody wrote: > >> >> i'm not sure about this but isnt it normally the case that different >> version modules dont get mixed up like that? >> IOW if pytesser was a properly pa

How to read and post tracebacks (was Registry Key Value Help)

2014-01-02 Thread Rustom Mody
On Fri, Jan 3, 2014 at 8:35 AM, Chris Angelico wrote: > On Fri, Jan 3, 2014 at 11:12 AM, J. McGaha wrote: >> When I run the this code I get an error that says the ‘int’ can’t be called. >> > > Python errors include full backtraces that show exactly what's going > on. They are extremely helpful, s

Re: How to read and post tracebacks (was Registry Key Value Help)

2014-01-02 Thread Rustom Mody
On Fri, Jan 3, 2014 at 9:33 AM, Chris Angelico wrote: > On Fri, Jan 3, 2014 at 2:58 PM, Rustom Mody wrote: >> Why not write up a few lines on "How to read and post python tracebacks" >> and post it on the wiki? > > You mean "copy and paste the whole output&qu

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Rustom Mody
On Fri, Jan 3, 2014 at 12:16 PM, Chris Seberino wrote: > I've heard it said, by no less a guru than Peter Norvig, that Python is a lot > like Lisp without the parentheses at least for the basics of Python. > > For pedagogical reasons, I'm wondering if it would be easy to implement a big > su

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Rustom Mody
On Fri, Jan 3, 2014 at 10:20 PM, Chris Seberino wrote: > > Exceptions, modules, OOP, etc. would be tricky to implement in Scheme but at > least the basics like for loops, while loops, assignment etc. would seem > doable and very instructive for students.they would thereafter, for all > time

Re: Blog "about python 3"

2014-01-04 Thread Rustom Mody
On Sun, Jan 5, 2014 at 8:50 AM, Roy Smith wrote: > I wrote: >> > I realize I'm taking this statement out of context, but yes, sometimes >> > fast is more important than correct. > > In article <52c8c301$0$29998$c3e8da3$54964...@news.astraweb.com>, > Steven D'Aprano wrote: >> Fast is never more i

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 2:16:56 PM UTC+5:30, Igor Korot wrote: > Hi, ALL, > I'm trying to process a file which has following lines: > > 192.168.1.6 > 192.168.1.7: ICMP echo request, id 100, seq 200, length 30 > > (this is the text file out of tcpdump) > > > Now I can esily split the line t

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 2:55:00 PM UTC+5:30, Igor Korot wrote: > > What if I want field 2 and field 3? ("seq 200" and "length 30") Wee you did say: > I'm interesred in only one element, so why should care about everything else? So its not clear what you want! Do you want a one-liner? You

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 3:32:24 PM UTC+5:30, Igor Korot wrote: > Hi, Rustom, > On Tue, Jan 14, 2014 at 1:37 AM, Rustom Mody wrote: > > On Tuesday, January 14, 2014 2:55:00 PM UTC+5:30, Igor Korot wrote: > >> What if I want field 2 and field 3? ("seq 200" and &

Re: What's correct Python syntax?

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 4:05:27 PM UTC+5:30, Igor Korot wrote: > Hi, Rustom, > > > > On Tue, Jan 14, 2014 at 2:16 AM, Rustom Mody wrote: > > You want this? > > > >>>> test = "I,like,my,chocolate" > >>>> test.split(&

Re: plotting slows down

2014-01-14 Thread Rustom Mody
On Tuesday, January 14, 2014 6:34:43 PM UTC+5:30, Norman Elliott wrote: > @Dave, no problem. I am using gedit to write the files and have it set to > translate tabs into 4 spaces which is what was recommended to me as the right > amount of indenting for python scripts. Dunno what you mean by 'tr

Re: Guessing the encoding from a BOM

2014-01-16 Thread Rustom Mody
On Friday, January 17, 2014 7:10:05 AM UTC+5:30, Tim Chase wrote: > On 2014-01-17 11:14, Chris Angelico wrote: > > UTF-8 specifies the byte order > > as part of the protocol, so you don't need to mark it. > You don't need to mark it when writing, but some idiots use it > anyway. If you're sniffin

Re: Guessing the encoding from a BOM

2014-01-17 Thread Rustom Mody
On Friday, January 17, 2014 9:56:28 PM UTC+5:30, Pete Forman wrote: > Rustom Mody writes: > > On Friday, January 17, 2014 7:10:05 AM UTC+5:30, Tim Chase wrote: > >> On 2014-01-17 11:14, Chris Angelico wrote: > >> > UTF-8 specifies the byte order > >> >

Re: How to write this as a list comprehension?

2014-01-17 Thread Rustom Mody
On Saturday, January 18, 2014 4:49:55 AM UTC+5:30, Piet van Oostrum wrote: > Hi, > I am looking for an elegant way to write the following code as a list > comprehension: > labels = [] > for then, name in mylist: > _, mn, dy, _, _, _, wd, _, _ = localtime(then) > labels.append(somefunc(mn,

Re: How to write this as a list comprehension?

2014-01-18 Thread Rustom Mody
On Saturday, January 18, 2014 2:06:29 PM UTC+5:30, Peter Otten wrote: > Options I can think of: > You could do it in two steps... > time_name_pairs = ((localtime(then), name) for then, name in mylist) > labels = [somefunc(t.tm_mon, t.tm_mday, t.tm_wday, name) > for t, name in time_na

Re: question about input() and/or raw_input()

2014-01-18 Thread Rustom Mody
On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote: > Pardon me for being cynical, but in the entire history of the universe, > has anybody ever used input()/raw_input() for anything other than a > homework problem? Similar 'cynicism' regarding print would be salutary for producin

Re: question about input() and/or raw_input()

2014-01-18 Thread Rustom Mody
On Sunday, January 19, 2014 9:51:36 AM UTC+5:30, Chris Angelico wrote: > On Sun, Jan 19, 2014 at 3:15 PM, Rustom Mody wrote: > > On Sunday, January 19, 2014 12:00:20 AM UTC+5:30, Roy Smith wrote: > >> Pardon me for being cynical, but in the entire history of the universe, >

Re: question about input() and/or raw_input()

2014-01-19 Thread Rustom Mody
On Sunday, January 19, 2014 10:29:58 AM UTC+5:30, Chris Angelico wrote: > On Sun, Jan 19, 2014 at 3:43 PM, Rustom Mody wrote: > > Because these two pieces of code > >>>> def foo(x): print x+1 > >>>> def bar(x): return x+1 > > look identical (to a beginn

Re: How to write this as a list comprehension?

2014-01-20 Thread Rustom Mody
On Monday, January 20, 2014 4:32:40 PM UTC+5:30, Piet van Oostrum wrote: > "Rhodri James" writes: > > On Sat, 18 Jan 2014 16:00:45 -, Jussi Piitulainen wrote: > [...] > >> I would write that on three lines anyway, properly indented: > >> [ somefunc(mn,day,wd,name) > >> for (then, name)

Re: Can post a code but afraid of plagiarism

2014-01-20 Thread Rustom Mody
On Monday, January 20, 2014 7:38:28 PM UTC+5:30, Roy Smith wrote: > Chris Angelico wrote: > > On Mon, Jan 20, 2014 at 4:21 PM, Dan Stromberg wrote: > > > I did a short time of teaching while I was in school. If three > > > students all turned in the same assignment, they all got docked > > > sig

Re: regex multiple patterns in order

2014-01-20 Thread Rustom Mody
On Monday, January 20, 2014 10:10:32 PM UTC+5:30, Devin Jeanpierre wrote: > On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence wrote: > > On 20/01/2014 16:04, Neil Cerutti wrote: > >> I use regular expressions regularly, for example, when editing > >> text with gvim. But when I want to use them in Pyth

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