Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Rustom Mody
On Sunday, February 28, 2016 at 12:04:52 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 27 Feb 2016 11:07 pm, Chris Angelico wrote: > > >> Isn't there any good GUI IDE like Visual Basic? I hope there are some > >> less well known GUI IDEs which I did not come across. Thanks. > > > > Sounds like

Re: Error in Tree Structure

2016-02-27 Thread Rustom Mody
On Saturday, February 27, 2016 at 2:47:53 PM UTC+5:30, subhaba...@gmail.com wrote: > I was trying to implement the code, > > import nltk > import nltk.tag, nltk.chunk, itertools > def ieertree2conlltags(tree, tag=nltk.tag.pos_tag): > words, ents = zip(*tree.pos()) > iobs = [] > prev

Re: Everything good about Python except GUI IDE?

2016-02-27 Thread Rustom Mody
On Saturday, February 27, 2016 at 4:49:21 PM UTC+5:30, wrong.a...@gmail.com wrote: > I have some VB forms with more than a hundred objects. If I cannot drag and > drop text boxes, list boxes, labels, etc., it will be too much work to create > that with several lines of code for each object. >

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Rustom Mody
On Saturday, February 20, 2016 at 10:55:02 AM UTC+5:30, Rustom Mody wrote: > On Saturday, February 20, 2016 at 8:07:03 AM UTC+5:30, Steven D'Aprano wrote: > > On Thu, 18 Feb 2016 09:08 am, Mark Lawrence wrote: > > > > > Seeing there is a lot of interest in asyncio r

Re: How the heck does async/await work in Python 3.5

2016-02-19 Thread Rustom Mody
On Saturday, February 20, 2016 at 8:07:03 AM UTC+5:30, Steven D'Aprano wrote: > On Thu, 18 Feb 2016 09:08 am, Mark Lawrence wrote: > > > Seeing there is a lot of interest in asyncio recently I figured people > > might be interested in this > >

Re: Python keyword args can be any string

2016-02-19 Thread Rustom Mody
On Thursday, February 18, 2016 at 11:12:45 AM UTC+5:30, Steven D'Aprano wrote: > Today I learned that **kwargs style keyword arguments can be any string: > > > py> def test(**kw): > ... print(kw) > ... > py> kwargs = {'abc-def': 42, '': 23, '---': 999, '123': 17} > py> test(**kwargs) > {'':

Re: Guido on python3 for beginners

2016-02-18 Thread Rustom Mody
On Friday, February 19, 2016 at 6:48:12 AM UTC+5:30, Steven D'Aprano wrote: > > > But apart from that, I think that "teaching" versus "doing" language is a > false dichotomy. Teaching languages should have a shallow learning curve > (easy to get started and learn the language, easy

Re: Guido on python3 for beginners

2016-02-18 Thread Rustom Mody
On Thursday, February 18, 2016 at 9:22:10 PM UTC+5:30, Random832 wrote: > On Thu, Feb 18, 2016, at 07:25, Rustom Mody wrote: > > My beef is somewhat different: viz that post 70s (Pascal) and 80s > > (scheme) > > programming pedagogy has deteriorated with general purpose la

Re: Guido on python3 for beginners

2016-02-18 Thread Rustom Mody
On Thursday, February 18, 2016 at 12:17:26 PM UTC+5:30, Steven D'Aprano wrote: > On Wednesday 17 February 2016 19:51, Rustom Mody wrote: > > > I hope someone can help me find this link: There is some record that Guido > > has said that python3 is probably a bit harder on

Guido on python3 for beginners

2016-02-17 Thread Rustom Mody
On Tuesday, February 16, 2016 at 10:54:43 AM UTC+5:30, John Ladasky wrote: > On Monday, February 15, 2016 at 6:02:24 PM UTC-8, Rick Johnson wrote: > > I don't need Python3. And i reckon that by the time i do, > > something more interesting will come along, or, i'll create > > something more

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-06 Thread Rustom Mody
On Sunday, February 7, 2016 at 8:04:42 AM UTC+1, Paul Rubin wrote: > Steven D'Aprano writes: > > According to TIOBE, Python's popularity continues to grow: > > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html > > I wonder how much of that growth is Python 3 and how much is Python

Re: psss...I want to move from Perl to Python

2016-01-31 Thread Rustom Mody
On Monday, February 1, 2016 at 5:22:22 AM UTC+5:30, Terry Reedy wrote: > On 1/31/2016 5:34 PM, Fillmore wrote: > > On 01/30/2016 05:26 AM, wxjmfauth wrote: > > > >>> Python 2 vs python 3 is anything but "solved". > >> Python 3.5.1 is still suffering from the same buggy > >> behaviour as in Python

Re: psss...I want to move from Perl to Python

2016-01-31 Thread Rustom Mody
On Sunday, January 31, 2016 at 11:15:50 PM UTC+5:30, Paul Rubin wrote: > Rustom Mody writes: > > I would guess it needs more recoding than explicit compilation! > > Maybe something like http://www.colm.net/open-source/ragel/ > > Unfortunately no python binding so far :-(

Re: psss...I want to move from Perl to Python

2016-01-31 Thread Rustom Mody
On Monday, February 1, 2016 at 8:45:38 AM UTC+5:30, Chris Angelico wrote: > There are a lot of people here who post good content but phrase things > poorly. And everyone has a bad day. (Terry Reedy, I'm hoping this was > just a bad day - there were several rather caustic posts from you. > Sorry to

Re: psss...I want to move from Perl to Python

2016-01-31 Thread Rustom Mody
True... $ python Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> re._MAXCACHE 100 But 100 is still large enough that for most normal users/uses re-compilation is pointless.

Re: psss...I want to move from Perl to Python

2016-01-30 Thread Rustom Mody
On Sunday, January 31, 2016 at 7:27:06 AM UTC+5:30, Steven D'Aprano wrote: > On Sunday 31 January 2016 09:18, Gregory Ewing wrote: > > > Rustom Mody wrote: > >> 1. One can use string-re's instead of compiled re's > > > > And I gather that string REs are compile

Re: psss...I want to move from Perl to Python

2016-01-30 Thread Rustom Mody
On Sunday, January 31, 2016 at 9:18:31 AM UTC+5:30, Cameron Simpson wrote: > On 30Jan2016 19:22, rusi wrote: > >Python 3.4.3+ (default, Oct 14 2015, 16:03:50) > >[GCC 5.2.1 20151010] on linux > >Type "help", "copyright", "credits" or "license" for more information. > python.el: native

Re: psss...I want to move from Perl to Python

2016-01-29 Thread Rustom Mody
On Saturday, January 30, 2016 at 3:01:09 AM UTC+5:30, Rick Johnson wrote: > On Friday, January 29, 2016 at 6:21:21 AM UTC-6, Ulli Horlacher wrote: > > I nearly gave up with Python at the very beginning before > > I realised that OO-programming is optional in Python! :-) > > Most tutorials I found

Re: psss...I want to move from Perl to Python

2016-01-29 Thread Rustom Mody
On Saturday, January 30, 2016 at 3:01:09 AM UTC+5:30, Rick Johnson wrote: > On Friday, January 29, 2016 at 6:21:21 AM UTC-6, Ulli Horlacher wrote: > > I nearly gave up with Python at the very beginning before > > I realised that OO-programming is optional in Python! :-) > > Most tutorials I found

Re: how to get python version ?

2016-01-27 Thread Rustom Mody
On Thursday, January 28, 2016 at 10:51:17 AM UTC+5:30, namenob...@gmail.com wrote: > hi > > is there something analogous to sys.platform that lets you get the version of > python you're using? sorry if the question is too see-spot-run. thanks if you > can help > > peace > stm You want this??

Re: Question about asyncio and blocking operations

2016-01-25 Thread Rustom Mody
On Monday, January 25, 2016 at 9:16:13 PM UTC+5:30, Ian wrote: > On Mon, Jan 25, 2016 at 8:32 AM, Ian Kelly wrote: > > > > On Jan 25, 2016 2:04 AM, "Frank Millman" wrote: > >> > >> "Ian Kelly" wrote in message > >>> > >>> This seems to be a common misapprehension about asyncio programming. > >>>

Re: Refactoring in a large code base

2016-01-22 Thread Rustom Mody
On Friday, January 22, 2016 at 1:59:15 PM UTC+5:30, Marko Rauhamaa wrote: > Ben Finney : > > > The author points out there are times when a code base is large and > > complex enough that refactoring puts the programmer in a state of not > > knowing whether they're making progress, because until

Re: Refactoring in a large code base

2016-01-22 Thread Rustom Mody
On Friday, January 22, 2016 at 4:49:19 PM UTC+5:30, Chris Angelico wrote: > On Fri, Jan 22, 2016 at 9:19 PM, Marko Rauhamaa wrote: > > The knowhow, vision and skill is apparently very rare. On the product > > management side, we have the famous case of Steve Jobs, who simply told > > the

Re: Refactoring in a large code base

2016-01-22 Thread Rustom Mody
On Friday, January 22, 2016 at 7:13:49 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > IOW anyone who thinks that *arbitrary* complexity can *always* be > > tamed either has a visa to utopia or needs to re-evaluate (or get) a > > CS degree > > Not all com

Re: How clean/elegant is Python's syntax?

2016-01-22 Thread Rustom Mody
On Friday, May 31, 2013 at 1:06:29 AM UTC+5:30, Steven D'Aprano wrote: > On Thu, 30 May 2013 10:12:22 -0700, rusi wrote: > > > On Thu, May 30, 2013 at 9:34 AM, Ma Xiaojun wrote: > > >> Wait a minute! Isn't the most nature way of doing/thinking "generating > >> 9x9 multiplication table" two

Re: Refactoring in a large code base

2016-01-22 Thread Rustom Mody
On Friday, January 22, 2016 at 6:05:02 PM UTC+5:30, Chris Angelico wrote: > On Fri, Jan 22, 2016 at 11:04 PM, Rustom Mody wrote: > > 2. My students trying to work inside the lexer made a mess because the > > extant lexer is a mess. > > I.e. while python(3) *claims* to

Re: importing: what does "from" do?

2016-01-21 Thread Rustom Mody
On Thursday, January 21, 2016 at 7:53:07 PM UTC+5:30, Charles T. Smith wrote: > What does "from (module) import (func)" do? > > Please don't tell me that I shouldn't ask because real programmers > know not to have circular dependencies ... > > I have no idea what was imported before. I just

Re: When I need classes?

2016-01-13 Thread Rustom Mody
oint, you are already using OOP, and you may want to > formalize that in a class. >HTH On Wednesday, January 13, 2016 at 12:01:29 PM UTC+5:30, Rustom Mody wrote: > On Wednesday, January 13, 2016 at 10:57:23 AM UTC+5:30, Steven D'Aprano wrote: > > On Wednesday 13 January 2016

Re: When I need classes?

2016-01-12 Thread Rustom Mody
On Sunday, January 10, 2016 at 1:00:13 PM UTC+5:30, Arshpreet Singh wrote: > Hello Friends, I am quite new to OOP(object oriented Programming), I did some > projects with python which includes Data-Analysis, Flask Web Development and > some simple scripts. > > I have only one question which is

Re: When I need classes?

2016-01-12 Thread Rustom Mody
On Wednesday, January 13, 2016 at 10:57:23 AM UTC+5:30, Steven D'Aprano wrote: > On Wednesday 13 January 2016 14:36, Rustom Mody wrote: > > > 1. Python the LANGUAGE, is rather even-handed in paradigm choice: Choose > > OO, imperative, functional or whatever style pleases/suits

Re: Python installation in windows

2016-01-11 Thread Rustom Mody
On Monday, January 11, 2016 at 6:32:14 PM UTC+5:30, navneet bhatele wrote: > I have been trying to install the "python-3.5.1-amd64-webinstall " many > times and the Set up failed is shown up with named 0*80070002 - file > doesn't exist in dialog box Which windows? XP and 3.5 are not compatible

Re: Which Python editor has this feature?

2016-01-10 Thread Rustom Mody
On Monday, January 11, 2016 at 7:30:10 AM UTC+5:30, jf...@ms4.hinet.net wrote: > It lets you jump between the current cursor position and the line the upper > level indentation start, something like the bracket matching in C editor. > Because of Python use indentation as its code block mark, It

Re: Help on return type(?)

2016-01-09 Thread Rustom Mody
On Sunday, January 10, 2016 at 7:16:23 AM UTC+5:30, Robert wrote: > Hi, > > I see below code snippet. The return line is not as the usual type. > > > > def make_cov(cov_type, n_comp, n_fea): > mincv = 0.1 > rand = np.random.random > return { > 'spherical': (mincv + mincv *

Re: How to union nested Sets / A single set from nested sets?

2016-01-06 Thread Rustom Mody
On Wednesday, January 6, 2016 at 6:48:28 PM UTC+5:30, mviljamaa wrote: > I'm forming sets by set.adding to sets and this leads to sets such as: > > Set([ImmutableSet(['a', ImmutableSet(['a'])]), ImmutableSet(['b', > 'c'])]) > > Is there way union these to a single set, i.e. get > > Set(['a',

Re: raise None

2016-01-04 Thread Rustom Mody
On Monday, January 4, 2016 at 11:23:24 AM UTC+5:30, Rustom Mody wrote: > On Monday, January 4, 2016 at 10:49:39 AM UTC+5:30, Steven D'Aprano wrote: > > On Fri, 1 Jan 2016 10:27 am, Ben Finney wrote: > > > > > If I could have the traceback continue into the C code and tel

Re: raise None

2016-01-03 Thread Rustom Mody
On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano wrote: > But I think it is a real issue. I believe in beautiful tracebacks that give > you just the right amount of information, neither too little nor two much. > Debugging is hard enough with being given more information than

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 10:49:39 AM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jan 2016 10:27 am, Ben Finney wrote: > > > If I could have the traceback continue into the C code and tell me the > > line of C code that raised the exception, *that's* what I'd choose. > > If you are serious

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 10:49:39 AM UTC+5:30, Steven D'Aprano wrote: > On Fri, 1 Jan 2016 10:27 am, Ben Finney wrote: > > > If I could have the traceback continue into the C code and tell me the > > line of C code that raised the exception, *that's* what I'd choose. > > If you are serious

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 9:02:16 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jan 4, 2016 at 2:04 PM, Rustom Mody wrote: > > On Thursday, December 31, 2015 at 9:05:58 PM UTC+5:30, Steven D'Aprano > > wrote: > >> But I think it is a real issue. I believe in beauti

Re: raise None

2016-01-03 Thread Rustom Mody
On Monday, January 4, 2016 at 11:42:51 AM UTC+5:30, Dan Sommers wrote: > > I'm saddened but not astonished at just how much opposition there is > > to point (1) ... > > I'll echo the sentiment that we're all adults here, and my opinion that > if you're reading tracebacks, then you want as much

Re: What meaning is '[: , None]'?

2016-01-02 Thread Rustom Mody
On Saturday, January 2, 2016 at 6:14:24 PM UTC+5:30, Robert wrote: > Hi, > > I read a code snippet, in which object w_A is: > > > w_A > Out[48]: array([ 0.10708809, 0.94933575, 0.8412686 , 0.03280939, > 0.59985308]) > > > Then, I don't know what is '[: ' below: > vs_A = w_A[:, None] *

Re: (Execution) Termination bit, Alternation bit.

2015-12-29 Thread Rustom Mody
On Saturday, December 19, 2015 at 11:26:55 PM UTC+5:30, Skybuck Flying wrote: > Hello, > > I'd like to see instruction execution enhanced with the following two ideas: > > 1. A termination bit, and a terminator pointer. > 2. A alternation bit, and a alternate pointer. > > The purpose of these

Re: Python 2.2 or 3.5

2015-10-11 Thread Rustom Mody
On Sunday, October 11, 2015 at 12:04:18 PM UTC+5:30, Chris Angelico wrote: > On Sun, Oct 11, 2015 at 5:15 PM, Chris Angelico wrote: > > On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody wrote: > >> At > >> https://docs.python.org/3.5/faq/extending.html#can-i-create-an-obj

Re: Python 2.2 or 3.5

2015-10-11 Thread Rustom Mody
On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote: > On 11/10/2015 06:11, Rustom Mody wrote: > > At > > https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-thro

python 2.2 or 3.5

2015-10-10 Thread Rustom Mody
At https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance it says In Python 2.2, you can inherit from built-in classes such as int, list, dict, etc. So is it 3.5 or 2.2? For some reason google

Python 2.2 or 3.5

2015-10-10 Thread Rustom Mody
At https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance it says In Python 2.2, you can inherit from built-in classes such as int, list, dict, etc. So is it 3.5 or 2.2? For some reason google

Re: packaging code with compiled libraries

2015-10-05 Thread Rustom Mody
On Tuesday, October 6, 2015 at 1:14:05 AM UTC+5:30, Tim wrote: > And that seems to work, but after reading more from the Python Packaging > Authority, I wonder if that is the right way. Should I be using wheels > instead? > I think my brain fried a little bit while going through the doc. You

Re: Check if a given value is out of certain range

2015-10-04 Thread Rustom Mody
On Sunday, October 4, 2015 at 7:18:11 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 3 Oct 2015 10:12 pm, Laura Creighton wrote: > > > Actually, the fact that adults have more difficulty processing > > negations is one of the earliest things proven experimentally > > in experimental psychology. >

Re: Check if a given value is out of certain range

2015-10-04 Thread Rustom Mody
On Monday, October 5, 2015 at 7:58:34 AM UTC+5:30, Rustom Mody wrote: > On Sunday, October 4, 2015 at 7:18:11 PM UTC+5:30, Steven D'Aprano wrote: > > and some negations may technically be harder to understand, but in a > > practical sense the difference may be negligible: > &g

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 10:02:40 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 12 Sep 2015 02:42 pm, Random832 wrote: > > > Anyway, maybe we do need a term to distinguish Python/C#/Java pointers > > from C/C++ pointers - maybe call it a "non-arithmetic" pointer, since > > the key thing

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 9:47:33 PM UTC+5:30, rurpy wrote: > Frankly, I feel a little insulted by people who presume that having > learned what a pointer is in C, that my brain is so rigid that I must > necessarily think that pointer means exactly what pointer means in C > forever

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 11:26:18 PM UTC+5:30, Akira Li wrote: > Rustom Mody writes: > > > On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton > > wrote: > >> In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes: > >

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Sunday, September 13, 2015 at 4:05:21 AM UTC+5:30, ru...@yahoo.com wrote: > On 09/12/2015 04:14 PM, Emile van Sebille wrote: > > On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote: > > > >> The question is whether what "pointer" means in languages that use the > >> word is*so* different

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 10:21:08 PM UTC+5:30, Steven D'Aprano wrote: > Python values are not addresses. Python values are objects. Which means for example...??? Atoms? Stars? People? Countries? > Addresses, even when they exist, are not accessible in the Python language. And you

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 10:38:46 PM UTC+5:30, Steven D'Aprano wrote: > On Sat, 12 Sep 2015 10:46 pm, Rustom Mody wrote: > > > On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote: > > >> You've clearly committed to some ontology

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Sunday, September 13, 2015 at 5:32:44 AM UTC+5:30, Ned Batchelder wrote: > In its implementation, CPython uses pointers. But if you say that Python > has pointers because CPython uses pointers, then you might as well say > that Python is statically typed because the CPython source has type >

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton wrote: > In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes: > >How about lay-English ontology in which "point to" and "refer to" are fairly > >synonymous? > > T

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Rustom Mody
On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote: > Random832 writes: > > > Ben Finney writes: > > > The reference value is inaccessible to the program, it can only be > > > used to get at the referenced object. > > > > What does it mean to access something, if not to do

Re: Context-aware return

2015-09-11 Thread Rustom Mody
On Friday, September 11, 2015 at 12:53:28 AM UTC+5:30, Grant Edwards wrote: > On 2015-09-10, Steven D'Aprano wrote: > > > I have a function which is intended for use at the interactive interpreter, > > but may sometimes be used non-interactively. I wish to change it's output > > depending on the

Re: Python handles globals badly.

2015-09-11 Thread Rustom Mody
On Friday, September 11, 2015 at 9:27:46 PM UTC+5:30, rand...@fastmail.us wrote: > On Fri, Sep 11, 2015, at 11:55, Chris Angelico wrote: > > On Sat, Sep 12, 2015 at 1:49 AM, Ian Kelly wrote: > > > Ah, that makes sense. It's writing into the dict that is created and > > > returned by locals(), but

Re: Python handles globals badly.

2015-09-11 Thread Rustom Mody
On Friday, September 11, 2015 at 10:04:25 AM UTC+5:30, Marko Rauhamaa wrote: > Ian Kelly : > > > You can use tabs *or* spaces. If you want to mix the two, then there > > would need to be some official decision made about how many spaces > > compose a tab, and then everybody who wants to use tabs

Re: Context-aware return

2015-09-11 Thread Rustom Mody
On Friday, September 11, 2015 at 12:53:28 AM UTC+5:30, Grant Edwards wrote: > On 2015-09-10, Steven D'Aprano wrote: > > > I have a function which is intended for use at the interactive interpreter, > > but may sometimes be used non-interactively. I wish to change it's output > > depending on the

Re: Program in or into (was Python handles globals badly)

2015-09-05 Thread Rustom Mody
On Sunday, September 6, 2015 at 8:05:28 AM UTC+5:30, Steven D'Aprano wrote: > On Sat, 5 Sep 2015 01:18 pm, Rustom Mody wrote: > > > Here's mergesort written in various languages > > http://rosettacode.org/wiki/Sorting_algorithms/Merge_sort > > > > You could look

Program in or into (was Python handles globals badly)

2015-09-04 Thread Rustom Mody
On Saturday, September 5, 2015 at 7:24:47 AM UTC+5:30, Chris Angelico wrote: > Indeed. The key to being a good programmer is not "write your code > despite the language you're using", but "write the code in the > language you're using". > A thought experiment for you Chris! Here's mergesort

Re: Hello

2015-09-04 Thread Rustom Mody
On Thursday, September 3, 2015 at 10:37:04 AM UTC+5:30, Phuong Phan wrote: > Hi Python community, Hi Phuong Phan > I am new to Python and currently taking one online course of computer science > and programming using Python. I really like Python because it is simple and > clarity but powerful

Re: How to compare lists

2015-09-01 Thread Rustom Mody
On Tuesday, September 1, 2015 at 12:54:08 PM UTC+5:30, Jahn wrote: > 1. > How can I save 256 lists, each list has 32 values( hexadecimal numbers) > 2. > How to compare the saved lists with another 256 lists ( that are read online > and have the > same structure as the list one)? > ( the first

Re: AttributeError: 'module' object has no attribute '__path__'

2015-08-31 Thread Rustom Mody
On Tuesday, September 1, 2015 at 3:46:15 AM UTC+5:30, Laura Creighton wrote: > Can you make the effort to move your cursor to the bottom of > the mail you are replying to, before you start typing, > so that your reply comes after what was said before, instead of > first thing, and thus before what

Re: OFF-TOPIC Ben's sig monster quote [was Re: Parametrized Unit Tests]

2015-08-29 Thread Rustom Mody
On Friday, August 28, 2015 at 11:56:53 AM UTC+5:30, Steven D'Aprano wrote: Completely off-topic. Stop reading now if you only want to read things about Python. On Fri, 28 Aug 2015 09:46 am, Ben Finney wrote: \        “Of course, everybody says they're for peace. Hitler was for | `\    

Re: Please don't make unfounded legalistic demands

2015-08-26 Thread Rustom Mody
On Wednesday, August 26, 2015 at 8:59:44 PM UTC+5:30, Ben Finney wrote: Terry Reedy writes: I disagree with prohibiting people encumbered by such systems from participating. I have no power to prohibit people here. I do strongly request that such threatening legalistic screeds stay

Re: Sometimes bottle takes a lot of time

2015-08-22 Thread Rustom Mody
On Saturday, August 22, 2015 at 9:03:52 PM UTC+5:30, Michael Torrie wrote: While it's true this particular problem is possibly beyond the scope of this python list (and may not be python-related at all), it's too bad a couple of people have taken the time to reply to your queries to simply

Re: Bug!

2015-08-21 Thread Rustom Mody
On Saturday, August 22, 2015 at 6:32:56 AM UTC+5:30, Chris Angelico wrote: On Sat, Aug 22, 2015 at 9:53 AM, sohcahtoa82 wrote: On Friday, August 21, 2015 at 3:42:36 PM UTC-7, hamilton wrote: On 8/21/2015 1:41 PM, Chris Angelico wrote: Python 3.5 does not support Windows XP. Is there a

Re: memory control in Python

2015-08-18 Thread Rustom Mody
On Tuesday, August 18, 2015 at 3:40:11 AM UTC+5:30, Ping Liu wrote: Hi, Dieter, If I move from Python to Jython or IronPython, do I need to retool whatever I have done? If so, that may take quite a long time. This may make the reimplementation impossible. Hi Ping There is a message from

Re: Python 3 sort() problem

2015-08-17 Thread Rustom Mody
On Monday, August 17, 2015 at 7:32:08 PM UTC+5:30, Владислав wrote: # first: works fine x = [1, 2, 4, 2, 1, 3] x = list(set(x)) x.sort() print(x)  # output: 1, 2, 3, 4 # second: why x became None ?? x = [1, 2, 4, 2, 1, 3] x = list(set(x)).sort() print(x)  # output: None I know that

Re: no module named kivy import error in ubuntu 14.04

2015-08-17 Thread Rustom Mody
On Monday, August 17, 2015 at 10:35:48 AM UTC+5:30, rurpy wrote: I hope someday Python gets a decent packaging/distribution story. You are in august company | The final question was about what he (Guido) hates in Python. Anything to do | with package distribution, he answered immediately. There

Re: Old DbaseV DOS Programmer wants to step over to new/actual modern program software

2015-08-16 Thread Rustom Mody
On Sunday, August 16, 2015 at 10:10:18 PM UTC+5:30, AGOSTINHO TEIXEIRA wrote: I'm a 25year DBASE-5 DOS programmer and want/have to step over to new program/platform software, because there is no future anymore for DOS after W-XP, I've been looking around for alternatives and cannot figure out

Re: no module named kivy import error in ubuntu 14.04

2015-08-16 Thread Rustom Mody
On Monday, August 17, 2015 at 7:30:14 AM UTC+5:30, Chris Angelico wrote: On Mon, Aug 17, 2015 at 5:16 AM, shiva upreti wrote: I am new to linux. I tried various things in attempt to install kivy. I installed python 2.7.10 (I think python3 was already installed in ubuntu 14.04). Then i

Re: How to model government organization hierarchies so that the list can expand and compress

2015-08-14 Thread Rustom Mody
On Saturday, August 15, 2015 at 5:12:13 AM UTC+5:30, Alex Glaros wrote: 3. Could not find Laura's response. Was it deleted? I dont see it either. I expect its in some other thread Laura's mail client is doing funny things to threading... Something Ive been noticing for a few days --

Re: Is Django the way to go for a newbie?

2015-08-13 Thread Rustom Mody
On Friday, August 14, 2015 at 6:35:27 AM UTC+5:30, Michael Torrie wrote: On 08/10/2015 10:08 PM, Rustom Mody wrote: On Tuesday, August 11, 2015 at 8:59:47 AM UTC+5:30, Michael Torrie wrote: On 08/10/2015 07:49 PM, Dwight GoldWinde wrote: Thank you, Gary, for this new information. I

Re: Is Django the way to go for a newbie?

2015-08-10 Thread Rustom Mody
On Tuesday, August 11, 2015 at 8:59:47 AM UTC+5:30, Michael Torrie wrote: On 08/10/2015 07:49 PM, Dwight GoldWinde wrote: Thank you, Gary, for this new information. I will be looking into virtualenv and vertualenvwrapper. I thought that Django was an IDE. But, it seems that an IDE is

Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]

2015-08-09 Thread Rustom Mody
On Sunday, August 9, 2015 at 2:57:20 AM UTC+5:30, Marko Rauhamaa wrote: Marko Rauhamaa : Steven D'Aprano : The contemporary standard approach is from Zermelo-Fraenkel set theory: define 0 as the empty set, and the successor to n as the union of n and the set containing n: 0 = {}

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 6:58:01 PM UTC+5:30, Tim Chase wrote: On 2015-08-02 12:11, Cecil Westerhof wrote: There are a lot of ways to store configuration information: - conf file - xml file - database - json file - and possible a lot of other ways I want to write a Python

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Sunday, August 2, 2015 at 3:44:51 PM UTC+5:30, Cecil Westerhof wrote: There are a lot of ways to store configuration information: - conf file - xml file - database - json file - and possible a lot of other ways One that I dont think has been mentioned: ast.literal_eval --

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 7:38:46 PM UTC+5:30, Steven D'Aprano wrote: On Wed, 5 Aug 2015 11:46 pm, Rustom Mody wrote: On Sunday, August 2, 2015 at 3:44:51 PM UTC+5:30, Cecil Westerhof wrote: There are a lot of ways to store configuration information: - conf file - xml file

Re: Is this an example of tail recursion?

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 8:43:31 PM UTC+5:30, jennyf...@gmail.com wrote: I am trying to learn differences between tail recursion and non tail recursion. Is the following recursive code tail recursive? If it is not how to convert it to tail recursion? If it is how to convert it to

Re: Is this an example of tail recursion?

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 9:07:52 PM UTC+5:30, jennyf...@gmail.com wrote: On Wednesday, August 5, 2015 at 9:21:33 AM UTC-6, Rustom Mody wrote: On Wednesday, August 5, 2015 at 8:43:31 PM UTC+5:30, jennyf...@gmail.com wrote: I am trying to learn differences between tail recursion

Re: Is this an example of tail recursion?

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 10:11:30 PM UTC+5:30, wrote: On Wednesday, August 5, 2015 at 10:29:21 AM UTC-6, Chris Angelico wrote: On Thu, Aug 6, 2015 at 2:10 AM, Rustom Mody wrote: 1 + x does not *call* 1 .__add__(x) It *is* that [Barring corner cases of radd etc] IOW I am

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Thursday, August 6, 2015 at 6:32:03 AM UTC+5:30, Rustom Mody wrote: By contrast here is a more friendly error message (had put a comma where a colon required) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.4/ast.py, line 46, in literal_eval

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Thursday, August 6, 2015 at 2:31:52 AM UTC+5:30, Tim Chase wrote: On 2015-08-05 06:37, Rustom Mody wrote: config = {} with open('config.ini') as f: for row in f: row = row.strip() if not row or row.startswith(('#', ';')): continue k, _, v

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Rustom Mody
On Thursday, August 6, 2015 at 6:36:56 AM UTC+5:30, Terry Reedy wrote: There have been discussions, such as today on Idle-sig , about who uses Idle and who we should design it for. If you use Idle in any way, or know of or teach classes using Idle, please answer as many of the questions

Re: Uninstall

2015-08-04 Thread Rustom Mody
On Wednesday, August 5, 2015 at 7:49:10 AM UTC+5:30, Mario Figueiredo wrote: On Wed, Aug 5, 2015 at 3:08 AM, Mario Figueiredo mar...@gmail.com wrote: But being an asshole does not. That is something one chooses to become. Your answer squarely puts you in the group of people that chose to

Re: Most Pythonic way to store (small) configuration

2015-08-04 Thread Rustom Mody
On Wednesday, August 5, 2015 at 10:19:11 AM UTC+5:30, Michael Torrie wrote: On 08/04/2015 08:44 PM, wrote: On Tue, Aug 4, 2015, at 21:32, Michael Torrie wrote: In many of my projects I put basic config variables in a file like config.py and import that in each module that needs it. The

Re: Which Python do I need for the below?

2015-08-01 Thread Rustom Mody
On Saturday, August 1, 2015 at 10:07:37 PM UTC+5:30, Emile van Sebille wrote: On 7/29/2015 10:52 AM, Joe Sanders wrote: Hello- Which Python do I need for the below? with instructions please! [cid:image001.png@01D0C9FD.677CDED0] Seeing that you have no responses yet I'm guessing most

Re: My code won't work if I double click the saved file

2015-08-01 Thread Rustom Mody
On Saturday, August 1, 2015 at 9:28:56 PM UTC+5:30, Ben Iannitelli wrote: Everyone else: sorry if I messed up with this post somehow, it's my first time writing back to anyone on the newsletter. Its fine Thanks for trying to help [Just try to (hard)break your lines at around 72 columns/chars

Re: GvR Europython keynote described on lwn.net

2015-07-31 Thread Rustom Mody
On Friday, July 31, 2015 at 12:03:36 PM UTC+5:30, Paul Rubin wrote: The final question was about what he hates in Python. Anything to do with package distribution, he answered immediately. There are problems with version skew and dependencies that just make for an endless mess. He dreads it

Re: Gmail eats Python

2015-07-29 Thread Rustom Mody
On Thursday, July 30, 2015 at 6:15:56 AM UTC+5:30, Cameron Simpson wrote: On 29Jul2015 18:32, Laura Creighton wrote: These control characters are the very basic move characters in emacs. People have always been free to remap them if they want them to do something else, but waking up in the

Re: Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter?

2015-07-28 Thread Rustom Mody
On Wednesday, July 29, 2015 at 6:45:45 AM UTC+5:30, Chris Angelico wrote: On Tue, Jul 28, 2015 at 11:55 PM, Victor Hooi wrote: I have a line that looks like this: 14 *0330 *0 760 411|0 0 770g 1544g 117g 1414 computedshopcartdb:103.5% 0

Re: Send data to asyncio coroutine

2015-07-28 Thread Rustom Mody
On Wednesday, July 29, 2015 at 4:37:22 AM UTC+5:30, Ian wrote: I don't entirely disagree. I think that the implementation of async coroutines on top of synchronous coroutines on top of generators is overly clever and results in a somewhat leaky abstraction and a fair amount of confusion. Hear

Re: Gmail eats Python

2015-07-28 Thread Rustom Mody
: Rustom Mody writes: On Sunday, July 26, 2015 at 2:06:00 PM UTC+5:30, Marko Rauhamaa wrote: What would you like to achieve, exactly? Some attitude correction? With all respect, take your own advice. And use an editor that works for you. Sorry if I seemed insulting to you

Re: Gmail eats Python

2015-07-26 Thread Rustom Mody
On Sunday, July 26, 2015 at 4:13:17 PM UTC+5:30, Jussi Piitulainen wrote: Rustom Mody writes: On Sunday, July 26, 2015 at 2:06:00 PM UTC+5:30, Marko Rauhamaa wrote: What would you like to achieve, exactly? Some attitude correction? With all respect, take your own advice. And use

Re: Gmail eats Python

2015-07-26 Thread Rustom Mody
On Sunday, July 26, 2015 at 2:06:00 PM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody : Emacs 'tries to be everything' in exactly the same way that a 'general purpose programming language' is too general and by pretending to solve all problems actually solves none (until you hire

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