Re: pygresql

2007-11-04 Thread rustom
On Nov 4, 8:45 pm, JD <[EMAIL PROTECTED]> wrote: > Hi there. > > I'm trying to use python with postgresql. I decided to use psycopg to > interact with the postgresql server. When installing psycopg it > appeared that I needed mxDateTime. So I decided to install the mxbase > package. > > I received

python equivalent to heckle

2007-11-06 Thread rustom
heckle in ruby is inspired by jester for java. I quote: Heckle is a mutation tester. It modifies your code and runs your tests to make sure they fail. The idea is that if code can be changed and your tests don't notice, either that code isn't being covered or it doesn't do anything. from http://gl

Re: Python IDE

2007-11-09 Thread rustom
On Nov 10, 8:43 am, [EMAIL PROTECTED] wrote: > On Nov 3, 10:11 pm, Simon Pickles <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have recently moved from Windows XP to Ubuntu Gutsy. > > > I need a Python IDE and debugger, but have yet to find one as good as > > Pyscripter for Windows. Can anyone recom

Re: rope python-emacs problem

2008-10-15 Thread rustom
[EMAIL PROTECTED] wrote: > On Oct 15, 7:19�pm, "Rustom Mody" <[EMAIL PROTECTED]> wrote: > > Ive been trying to useropefor python in emacs and I get > > a backtrace which starts with > > AttributeError: 'module' object has no attribute 'samefi

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread rustom
On Oct 16, 8:37 am, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Oct 14, 7:37 pm, [EMAIL PROTECTED] wrote: > > > If you're an Emacs user who has used both python-mode.el (the python mode > > code distributed with Python and XEmacs) and python.el (the python mode code > > distributed with GNU E

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread rustom
On Oct 16, 12:54 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Lawrence D'Oliveiro a écrit : > > > I find Emacs modes just too confusing. I do all my editing in fundamental > > mode. > > Sounds like buying a cray supercomputer to end up doing computation by > hand... Reminds me of a funny s

suid/sudo in python

2009-03-29 Thread rustom
Im trying to write a program that has su permissions for some file system tasks and is non-su elsewhere. This is typically done in C with suid root owned code. What is the python paradigm for this kind of thing? (if at all) -- http://mail.python.org/mailman/listinfo/python-list

Re: Re. suid/sudo in python

2009-03-30 Thread rustom
On Mar 30, 6:47 pm, [email protected] wrote: > On Mar 30, 1:16 pm, Rustom Mody wrote: > > > > > Ben Finney wrote > > > > The key thing to realise is that, having relinquished privilege, the same > > > process can't get it back again as easily

Re: Re. suid/sudo in python

2009-03-30 Thread rustom
On Mar 30, 9:41 pm, "Martin P. Hellwig" wrote: > Rustom Mody wrote: > > The essence of your program is that you only want information, that is > great! Since that makes it all a bit simpler. > > How about writing a cronjob that outputs the require information in

Re: Thoughts on language-level configuration support?

2009-03-31 Thread rustom
I am not sure I understand your solution. I certainly think that the problem is big, very much bigger than is appreciated. Think of the hoopla in the RoR world about convention-over- configuration. On the other hand I feel that emacs is becoming messier and messier because it has taken up somethin

Re: help with recursive whitespace filter in

2009-05-10 Thread rustom
On May 10, 9:49 pm, Steve Howell wrote: > On May 10, 9:10 am, Rustom Mody wrote: > > > > > I am trying to write a recursive filter to remove whitespace-only > > nodes for minidom. > > The code is below. > > > Strangely it deletes some whitespace nodes an

Re: using urlretrive/urlopen

2009-05-17 Thread rustom
On May 16, 6:30 am, "Gabriel Genellina" wrote: > En Fri, 15 May 2009 12:03:09 -0300, Rustom Mody   > escribió: > > > I am trying to talk to a server that runs on localhost > > The server runs onhttp://localhost:7000/and that opens alright in  a > > web brows

Re: making a python program in windows

2009-05-21 Thread rustom
On May 21, 3:19 pm, "Martin P. Hellwig" wrote: > Rustom Mody wrote: > > I know how to make a python script behave like a (standalone) program > > in unix -- > > 1. put a #! path/to/python as the first line > > 2. make the file executable > > > T

Re: making a python program in windows

2009-05-22 Thread rustom
On May 21, 5:09 pm, Duncan Booth wrote: > rustom wrote: > > i suppose the question is entirely about setting properly (and > > grokking) file associations -- why is a .py file associated with > > pythonw and not python? And is making this association right enough to &

Re: 4 hundred quadrillonth?

2009-05-22 Thread rustom
On May 22, 6:56 am, AggieDan04 wrote: > The error in this example is roughly equivalent to the width of a red > blood cell compared to the distance between Earth and the sun.  There > are very few applications that need more accuracy than that. For a mathematician there are no inexact numbers; fo

Re: What text editor is everyone using for Python

2009-05-27 Thread rustom
I dont think Ive seen it said on this thread (if yes sorry for missing it) If you use emacs 1. DONT use the python.el that comes with emacs but use python-mode.el that comes from python 2. Use python as an interpreter ie not as you would use C or Java or ... which is to say 2.1 Start python as an

Re: what I would like python.el to do (and maybe it does)

2009-06-02 Thread rustom
> But since i like to do it The Right Way, I would > like to let the python-mode worry about this... > > Sorry if this is just a bunch of obvious thoughts to most of you. > > Regards, > Giovanni I dont see whats the problem. Heres my attempt to show you my emacs windows using python-mode (python.e

Re: Java or C++?

2008-04-21 Thread rustom
On Apr 14, 11:44 am, [EMAIL PROTECTED] wrote: > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure w

Re: diffing and uniqing directories

2008-04-26 Thread rustom
On Apr 27, 12:31 am, [EMAIL PROTECTED] wrote: > On Apr 26, 1:14 pm, "Rustom Mody" <[EMAIL PROTECTED]> wrote: > > > > > Over years Ive collected tgz's of my directories. I would like to diff > > and uniq them > > > Now I guess it would be quite

Re: diffing and uniqing directories

2008-04-27 Thread rustom
On Apr 27, 11:29 pm, "telus news" <[EMAIL PROTECTED]> wrote: > Just so happens that I am partially finished a gui file backup app. I have > many backup CDs and I wanted to consolidate them. You know, all image files > in one dir, all install files in another dir, etc. My app scans the input > dir t

Re: eval() == evil? --- How to use it safely?

2008-09-03 Thread rustom
On Aug 29, 4:42 am, castironpi <[EMAIL PROTECTED]> wrote: > May I suggest PyYAML? I second that. Yaml is very pythonic (being indentation based) and pyyaml is sweet. Only make sure you use safe_load not load and you will have only default construction for standard python objects -- lists, dicti

Re: reifying indent and dedent into braces

2009-10-13 Thread rustom
On Oct 13, 12:45 pm, Steven D'Aprano wrote: > > Have you looked at the tokenize module? > > http://docs.python.org/library/tokenize.html Thanks Steven -- that was what I was looking for. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to run python script in emacs

2009-10-13 Thread rustom
On Sep 26, 8:54 pm, devilkin wrote: > I'm just starting learning python, and coding in emacs. I usually > split emacs window into two, coding in one, and run script in the > other, which is not very convenient. anyone can help me with it? is > there any tricks like emacs short cut? > > also pleas

Re: Can I run a python program from within emacs?

2009-11-01 Thread rustom
On Nov 1, 7:20 pm, Robinson wrote: > I have also just started with both Aquamacs and Python so I ask for   > your patience as well. > When I evaluate the buffer (C-c C-C) I don't see any response or   > output from my python program. Should another buffer open   > automatically? Should a terminal

Re: About one class/function per module

2009-11-01 Thread rustom
On Nov 2, 3:11 am, Peng Yu wrote: > I recently asked how to support one class/function per module under > the title 'How to import only one module in a package when the package > __init__.py has already imports the modules?' I summarize my key > points below. In particular, I have to two questions

Re: Web development with Python 3.1

2009-11-04 Thread rustom
On Oct 30, 6:23 pm, Dotan Cohen wrote: > The point is that I want to use only _Python_ features, not > Django/Mako/whatever features. Pure python has a builtin templating system -- its called % See http://simonwillison.net/2003/Jul/28/simpleTemplates/ -- http://mail.python.org/mailman/listinf

Re: IDE+hg

2009-11-24 Thread rustom
On Nov 24, 8:13 pm, Richard Riley wrote: > Gerhard Häring writes: > > Rhodri James wrote: > >> On Mon, 23 Nov 2009 19:20:27 -, NiklasRTZ wrote: > > >>> Dear experts, > >>> Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim > >>> Mercurial support not found i.e. buttons to c

Re: What was your strategy?

2010-11-14 Thread rustom
Jorge Biquez writes: > I was wondering if you can share what was the strategy you followed to > master Python (Yes I know I have to work hard study and practice a lot). One of the basic mistakes that folks (kids?) studying a language do is to study *only* the language. I guess the mistake happe

Re: TDD in python

2010-11-29 Thread rustom
On Nov 28, 7:52 pm, Stefan Behnel wrote: > Rustom Mody, 28.11.2010 11:58: > > > Does anyone know of something like this for python? > > >http://www.vimeo.com/13240481 > > The page seems to require a recent version of the Flash player. Could you > describe wh

Re: TDD in python

2010-11-29 Thread rustom
On Nov 29, 4:59 pm, André wrote: > On Nov 29, 7:31 am, rustom wrote: > > > > > On Nov 28, 7:52 pm, Stefan Behnel wrote: > > > > Rustom Mody, 28.11.2010 11:58: > > > > > Does anyone know of something like this for python? > > > > >http:

Re: Good books in computer science?

2009-06-13 Thread rustom
On Jun 14, 10:38 am, koranthala wrote: > Software Tools - Seems to be a classic - not sure whether I will buy. In that vein but more modern -- Art of Unix Programming by Eric Raymond (available online) Some of my old favorites: Intro to functional programming by Bird and Wadler TAOCP slightly more

Re: Good books in computer science?

2009-06-14 Thread rustom
On Jun 14, 6:04 pm, Steven D'Aprano wrote: > I think there are about 100 million VB code-monkeys who prove that theory > wrong. > > Seriously, and without denigrating any specific language, you can program by > (almost) mindlessly following a fixed number of recipes and patterns. This > will get

Re: Good books in computer science?

2009-06-29 Thread rustom
This thread has thrown up some interesting suggestions but they all seem to fall into one of two categories: - the high-ground: Dijkstra, Knuth etc - the low-ground: write (any-which-how) a lot of code And both these 'grounds' seem to cause more argument and less suggestions for good books. Let

Re: "Strong typing vs. strong testing"

2010-09-28 Thread rustom
On Sep 29, 5:32 am, Chris Rebert wrote: > On Tue, Sep 28, 2010 at 2:55 AM, Malcolm McLean > > > > wrote: > > On Sep 27, 9:29 pm, [email protected] (Pascal J. Bourguignon) > > wrote: > >> On the other hand, with the dynamic typing mindset, you might even wrap > >> your values (of whatever num

Re: "Strong typing vs. strong testing"

2010-09-30 Thread rustom
Some points that seem to be missed (or Ive missed them?) 1. A dichotomy is being made between 'static' languages like C and 'dynamic' languages like python/lisp. This dichotomy was valid 30 years ago, not today. In Haskell for example - static checking is stronger than in C/C++ -- its very hard

Re: "Strong typing vs. strong testing"

2010-10-01 Thread rustom
On Oct 1, 7:17 pm, Rui Maciel wrote: > a) no language is inherently more or less efficient than any other language.   > The efficiency > aspect is only related to how those languages are implemented (i.e., the > investments made in > optimizing the compilers/interpreters) I used to believe the

Re: Compare source code

2010-11-02 Thread rustom
Sigh! How flame-wars tend to lose the original question: On Oct 31, 5:02 pm, jf wrote: > Hi, > > I've a project with tabs and spaces mixed (yes I know it's bad). Do python aficionados want to suggest that mixing spaces and tabs is a 'good thing'? -- http://mail.python.org/mailman/listinfo/pytho

Re: Man pages and info pages

2010-11-03 Thread rustom
On Nov 3, 3:11 pm, Daniel da Silva wrote: > Guys, this really has nothing to do with python. ?? python docs have nothing to do with python?? python docs by default on linux are read with info and many seem to find info unpleasant to use. Myself an old emacs user and cant say info helps me as muc

Re: Compare source code

2010-11-05 Thread rustom
On Nov 5, 8:25 am, Terry Reedy wrote: > On 11/4/2010 10:47 PM, Rustom Mody wrote: > > > As far as I am concerned python would not be python if its > > indentation=structure went.  However the original question -- mixing > > tabs and spaces is bad -- has got lost in

Re: Why "flat is better than nested"?

2010-11-06 Thread rustom
On Oct 26, 12:11 am, kj wrote: > In Steve Holden > writes: > > > > >On 10/25/2010 10:47 AM, rantingrick wrote: > >> On Oct 25, 5:07 am, kj wrote: > >>> In "The Zen of Python", one of the "maxims" is "flat is better than > >>> nested"?  Why?  Can anyone give me a concrete example that illustrat

Re: Why "flat is better than nested"?

2010-11-06 Thread rustom
On Nov 6, 2:52 pm, Peter Otten <[email protected]> wrote: > rustom wrote: > > If you take zen seriously you dont get it > > If you dont take zen seriously you dont get it > > You forgot: > > If you explain zen you don't get it I guess different communities ha

Re: Compare source code

2010-11-06 Thread rustom
On Nov 6, 5:21 pm, [email protected] (Mark Wooding) wrote: > Rustom Mody writes: > > As for tools' brokeness regarding spaces/tabs/indentation heres a > > thread on the emacs list wherein emacs dev Stefan Monnier admits to > > the fact that emacs' handlin

Re: python test frameworks

2010-11-07 Thread rustom
On Nov 7, 7:09 pm, Kev Dwyer wrote: > On Sun, 07 Nov 2010 10:56:46 +0530, Rustom Mody wrote: > > There are a large number of test frameworks in/for python.  Apart from > > what comes builtin with python there seems to be nose, staf, qmtest etc > > etc. > > > Is there

Illegal suggestions on python list

2013-07-04 Thread Rustom Mody
On Thu, Jul 4, 2013 at 9:16 PM, Steven D'Aprano < [email protected]> wrote: > On Thu, 04 Jul 2013 07:02:26 -0700, rusi wrote: > > > On Thursday, July 4, 2013 7:03:19 PM UTC+5:30, Steve Simmons wrote: > >> Boy oh boy! You really are a slow learner Nicos. You have just offered > >

Re: Important features for editors

2013-07-05 Thread Rustom Mody
On Sat, Jul 6, 2013 at 4:36 AM, Cameron Simpson wrote: > While I started with vi just slightly before encountering emacs > (mid-to-late 1980s, both), my main trouble with choosing emacs was > the heavy use of control keys. Vi's modal nature means that in > "edit" mode, all the keystrokes are avai

semi-programmer-ish envs/apps using python

2013-07-05 Thread Rustom Mody
Some systems use python as a glue to make environments which are used by professionals that are not primarily programmers. Some egs: Scientific prog with Scipy+matplotlib Data analysis with pandas Visual arts with processing (Is pyprocessing stable enough?) Linguistics with nltk Is there such a l

Re: Important features for editors

2013-07-06 Thread Rustom Mody
On Sat, Jul 6, 2013 at 12:22 PM, Eric S. Johansson wrote: > ** > On Fri, 05 Jul 2013 23:13:24 -0400, Rustom Mody > wrote: > > Yes... > The fact that rms has crippling RSI should indicate that emacs' ergonomics > is not right. > > > > As someone crippled

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-13 Thread Rustom Mody
On Jun 13, 6:19 pm, Steven D'Aprano wrote: > Even if we accept that Dvorak is an optimization, it's a micro- > optimization. +1 Dvorak -- like qwerty and any other keyboard layout -- assumes the computer is a typewriter. This means in effect at least two constraints, necessary for the typewrite

Re: regex question

2011-07-29 Thread Rustom Mody
MRAB wrote: > findall returns a list of tuples (what the groups captured) if there is more than 1 group, > or a list of strings (what the group captured) if there is 1 group, or a list of > strings (what the regex matched) if there are no groups. Thanks. It would be good to put this in the manual

Re: Function "modes" vs. separate functions (was: PyWart: os.path needs immediate attention!)

2011-07-29 Thread Rustom Mody
Ben Finney said: > But this is all getting rather generic and abstract. What specific > real-world examples do you have in mind? regex match vs regex search? -- http://mail.python.org/mailman/listinfo/python-list

Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong?

2011-07-30 Thread Rustom Mody
I use pyyaml for such. http://yaml.org/ The builtin json support http://docs.python.org/library/json.html is a bit weaker but has the advantage of no extra install -- http://mail.python.org/mailman/listinfo/python-list

Re: Non Programming in python

2011-05-12 Thread Rustom Mody
On Wed, May 11, 2011 at 5:57 PM, Calvin Spealman wrote: > If this is the "non-programming side of python" then maybe some of us have > a lacking definition of what "programming" is. My mechanic stilll has to > check the tire pressure and I need to update the version number in PyPI. > O well you

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Rustom Mody
On Monday, September 4, 2017 at 7:50:22 AM UTC+5:30, Chris Angelico wrote: > On Mon, Sep 4, 2017 at 12:05 PM, Steve D'Aprano wrote: > > On Mon, 4 Sep 2017 04:15 am, Stephan Houben wrote: > > > >> Needless to say, according to the definition in Plotkin's paper, Python > >> is "call-by-value". > > >

Re: meaning of [ ]

2017-09-03 Thread Rustom Mody
On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: > Andrej Viktorovich wrote: > > I suppose p becomes array of strings but what [] means in this statement? > > Generally, it's an inline form of writing a loop that returns a list. There > are other types as well. Tsk tsk th

Re: A question on modification of a list via a function invocation

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 1:46:55 PM UTC+5:30, Gregory Ewing wrote: > Stefan Ram wrote: > > JavaScript and Python do not have references as values > > Yes, they do. The difference is that they don't have any > way of *not* having references as values, so there's less > need to use the word

Re: A question on modification of a list via a function invocation

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 3:35:54 PM UTC+5:30, Antoon Pardon wrote: > Op 04-09-17 om 00:44 schreef Dennis Lee Bieber: > > And is a limited theoretical study, heavy in mathematics and light in > > implementation. > > > > Programming Languages: Design and Implementation (Terrence W Prat

Re: meaning of [ ]

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > Rustom Mody writes: > > > On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: > >> Andrej Viktorovich wrote: > >> > I suppose p becomes array of strings bu

Re: A question on modification of a list via a function invocation

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 5:58:18 PM UTC+5:30, ROGER GRAYDON CHRISTMAN wrote: > >Does a poor job AFAIAC of explaining the difference between foo and bar in > foll def foo(x): x += 2 > def bar(x): x.append(2) > a=10 > b=[10] > foo(a) > a > >10 > bar(b) >

Re: meaning of [ ]

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 7:57:23 PM UTC+5:30, Rustom Mody wrote: > On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > > But [p for p in sys.path] is a list and "set-builder" notation is used > > for sets. Order is crucial for sys.path. Y

Re: A question on modification of a list via a function invocation

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 7:50:39 PM UTC+5:30, Steve D'Aprano wrote: > On Mon, 4 Sep 2017 01:11 pm, Rustom Mody wrote: > > Simply put: pythonistas have no coherent/consistent sense of what python > > values are. And the endless parameter-passing-nomenclature arguments a

Re: A question on modification of a list via a function invocation

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 8:37:45 PM UTC+5:30, Steve D'Aprano wrote: > On Tue, 5 Sep 2017 12:34 am, Rustom Mody wrote: > > > On Monday, September 4, 2017 at 5:58:18 PM UTC+5:30, ROGER GRAYDON CHRISTMAN > > wrote: > >> Or with just one function: >>> d

Re: A question on modification of a list via a function invocation

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 9:13:43 PM UTC+5:30, Steve D'Aprano wrote: > On Tue, 5 Sep 2017 01:17 am, Rustom Mody wrote: > > > Anton gave a picture explaining why/how references are needed and to be > > understood > > Antoon gave a picture demonstrating on

Re: meaning of [ ]

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 10:42:47 PM UTC+5:30, Rick Johnson wrote: > On Monday, September 4, 2017 at 9:27:23 AM UTC-5, Rustom Mody wrote: > > On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > > > Rustom Mody writes: > > > > > >

Please improve these comprehensions (was meaning of [ ])

2017-09-04 Thread Rustom Mody
Since these discussions are uselessly abstract and meta Here is some code I (tried) to write in class the other day The basic problem is of generating combinations Using the pascal-identity nCr + nC(r-1) = (n+1)Cr This can be written (Haskell) c :: Int -> Int -> Int c n 0 = 1 c 0 (r+1)

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-04 Thread Rustom Mody
On Tuesday, September 5, 2017 at 1:44:24 AM UTC+5:30, Ben Bacarisse wrote: > Rustom Mody writes: > > > Here is some code I (tried) to write in class the other day > > > > The basic problem is of generating combinations > > > Now thats neat as far as it goes b

Re: A question on modification of a list via a function invocation

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 6:42:07 PM UTC+5:30, Gregory Ewing wrote: > Steve D'Aprano wrote: > > The third entity is the reference linking the name to the object (the > > arrow). > > This isn't a runtime value in Python, nor is it a compile time entity that > > exists in source code. It is p

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 6:59:11 PM UTC+5:30, Ben Bacarisse wrote: > Rustom Mody writes: > > > On Tuesday, September 5, 2017 at 1:44:24 AM UTC+5:30, Ben Bacarisse wrote: > >> Rustom Mody writes: > >> > >> > Here is some code I (tried) to writ

Re: A question on modification of a list via a function invocation

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 7:12:48 PM UTC+5:30, Rustom Mody wrote: > On Tuesday, September 5, 2017 at 6:42:07 PM UTC+5:30, Gregory Ewing wrote: > > Steve D'Aprano wrote: > > > The third entity is the reference linking the name to the object (the > > > ar

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 7:32:52 PM UTC+5:30, Chris Angelico wrote: > On Tue, Sep 5, 2017 at 11:49 PM, Rustom Mody wrote: > > Pop et al wont work with frozen sets > > Containment wont work with sets — what mathematicians call 'not closed' > > All of which a

Re: Python console's workspace path

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 7:58:23 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I run Python 3.6 console under windows 10. Where is default console directory? > > I run script: > >>> tf = open ("aaa.txt", "w") > >>> tf.write(" %s" % 123) > >>> tf.close() > > Where file aaa.txt w

Re: Run python module from console

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 8:45:00 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prompt: > > >>> >> import myscr

Re: Run python module from console

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 8:45:00 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prompt: > > >>> By and large no

Re: A question on modification of a list via a function invocation

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 10:45:45 PM UTC+5:30, Ned Batchelder wrote: > On 9/5/17 1:02 PM, Steve D'Aprano wrote: > > On Tue, 5 Sep 2017 11:37 pm, Gregory Ewing wrote: > > > >> Dennis Lee Bieber wrote: > >>> Pascal, probably Modula-2, Visual BASIC are closer to the C++ reference > >>> semanti

Re: A question on modification of a list via a function invocation

2017-09-05 Thread Rustom Mody
On Wednesday, September 6, 2017 at 3:34:41 AM UTC+5:30, Marko Rauhamaa wrote: > Chris Angelico : > > > That shows that the Java '==' operator is like the Python 'is' > > operator, and checks for object identity. You haven't manipulated > > pointers at all. In contrast, here's a C program that actu

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-05 Thread Rustom Mody
On Wednesday, September 6, 2017 at 6:27:24 AM UTC+5:30, Steve D'Aprano wrote: > On Wed, 6 Sep 2017 12:19 am, Rustom Mody wrote: > > > And how do you write even the simplest assignment statement without a > > (mathematical) expression on the rhs? > > name = other_na

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-05 Thread Rustom Mody
On Wednesday, September 6, 2017 at 6:58:29 AM UTC+5:30, Rustom Mody wrote: > On Wednesday, September 6, 2017 at 6:27:24 AM UTC+5:30, Steve D'Aprano wrote: > > On Wed, 6 Sep 2017 12:19 am, Rustom Mody wrote: > > > What were Turing, Church, von Neumann, even Knuth by training

Re: A question on modification of a list via a function invocation

2017-09-05 Thread Rustom Mody
On Wednesday, September 6, 2017 at 9:22:15 AM UTC+5:30, Chris Angelico wrote: > On Wed, Sep 6, 2017 at 1:42 PM, Stefan Ram wrote: > > Steve D'Aprano writes: > >>So in what sense are references part of the Python language? > > > > It would be possible to describe Python using a concept > > calle

Re: A question on modification of a list via a function invocation

2017-09-05 Thread Rustom Mody
On Wednesday, September 6, 2017 at 9:55:10 AM UTC+5:30, Chris Angelico wrote: > On Wed, Sep 6, 2017 at 2:17 PM, Rustom Mody wrote: > > Well ⅓ the point of pointers may be printing them out — which even in a > > language > > with 1st class pointers like C is rarely done/need

Re: A question on modification of a list via a function invocation

2017-09-06 Thread Rustom Mody
On Wednesday, September 6, 2017 at 12:51:25 PM UTC+5:30, Gregory Ewing wrote: > Rustom Mody wrote: > > 2. is — machine representation, too fine to be useful > > Disagree - "is" in Python has an abstract definition that > doesn't depend on machine representatio

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-06 Thread Rustom Mody
On Wednesday, September 6, 2017 at 4:29:56 PM UTC+5:30, Gregory Ewing wrote: > Seems to me you're making life difficult for yourself (and > very inefficient) by insisting on doing the whole computation > with sets. If you want a set as a result, it's easy enough > to construct one from the list at

Re: A question on modification of a list via a function invocation

2017-09-06 Thread Rustom Mody
On Wednesday, September 6, 2017 at 5:08:20 PM UTC+5:30, Steve D'Aprano wrote: > On Wed, 6 Sep 2017 07:13 pm, Rustom Mody wrote: > > > > Can you explain what "id" and "is" without talking of memory? > > Yes. > > id() returns an abstract

Re: A question on modification of a list via a function invocation

2017-09-06 Thread Rustom Mody
On Wednesday, September 6, 2017 at 4:03:40 PM UTC+5:30, ROGER GRAYDON CHRISTMAN wrote: > On 5 Sep 2017 14:28:44, (Dennis Lee Bier) wrote: > > On 5 Sep 2017 17:57:18 GMT, > >> But what does "a C++ reference" refer to? > >> > > > Per Stroustrup (The C++ Programming Language 4th Ed, page 189) >

Re: A question on modification of a list via a function invocation

2017-09-06 Thread Rustom Mody
On Wednesday, September 6, 2017 at 5:48:48 PM UTC+5:30, Chris Angelico wrote: > On Wed, Sep 6, 2017 at 10:11 PM, Rustom Mody wrote: > > On Wednesday, September 6, 2017 at 5:08:20 PM UTC+5:30, Steve D'Aprano > > wrote: > >> On Wed, 6 Sep 2017 07:13 pm, Rustom Mody wr

Re: Please improve these comprehensions (was meaning of [ ])

2017-09-06 Thread Rustom Mody
s here can be In any case thanks for quoting Stefan's post which I would not see otherwise > > > On Wed, Sep 6, 2017 at 7:22 PM, Stefan Ram wrote: > > Rustom Mody writes: > >>Because the abstract idea of a permutation is a list (sequence) > > > >

Re: Why do we nned both - __init__() and __new__()

2017-09-07 Thread Rustom Mody
On Thursday, September 7, 2017 at 4:27:48 PM UTC+5:30, Andrej Viktorovich wrote: > Hello > > For my understanding both - __init__() and __new__() works like constructors. > And __new__() looks is closer to constructor. __init__() is more for variable > initialization. Why I can't just initialize

Re: A question on modification of a list via a function invocation

2017-09-07 Thread Rustom Mody
On 06/09/17 14:02, Stefan Ram wrote: > Chris Angelico writes: >> The 'is' operator tests if two things are the same thing. > >»Roughly speaking, to say of two things that they are >identical is nonsense, and to say of one thing that it >is identical with itself is to say not

Re: A question on modification of a list via a function invocation

2017-09-07 Thread Rustom Mody
On Thursday, September 7, 2017 at 6:52:04 PM UTC+5:30, Gregory Ewing wrote: > Rustom Mody wrote: > > > I said: In that case please restate the definition of 'is' from the manual > > which > > invokes the notion of 'memory' without bringing in memory.

Re: A question on modification of a list via a function invocation

2017-09-07 Thread Rustom Mody
On Friday, September 8, 2017 at 7:39:38 AM UTC+5:30, Steve D'Aprano wrote: > On Fri, 8 Sep 2017 04:24 am, Rustom Mody wrote: > > > On Thursday, September 7, 2017 at 6:52:04 PM UTC+5:30, Gregory Ewing wrote: > >> Rustom Mody wrote: > >> > >> > I said

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-09 Thread Rustom Mody
On Sunday, September 10, 2017 at 7:12:10 AM UTC+5:30, Gregory Ewing wrote: > Pavol Lisy wrote: > > Interesting reading: > > https://stackoverflow.blog/2017/09/06/incredible-growth-python/?cb=1 > > So, Python's rate of expansion is accelerating, like > the universe. Does that mean there's some kind

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-10 Thread Rustom Mody
On Sunday, September 10, 2017 at 3:15:32 PM UTC+5:30, Skip Montanaro wrote: > > * asyncio with its a-dialect > > What is a/the "a-dialect"? > > S I'd guess its the async/await (semi)keyworded python Compre with the (IMHO) better suggestion for codef/cocall https://lists.gt.net/python/dev/119731

Re: Python in Perspective

2017-09-10 Thread Rustom Mody
On Monday, September 11, 2017 at 3:08:51 AM UTC+5:30, [email protected] wrote: > On Sunday, September 10, 2017 at 11:21:26 AM UTC+1, Leam Hall wrote: > > y'all, > > > > My god-kids and their proginators lost most everything because of > > Harvey. I spent much of yesterday worrying about a friend

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-11 Thread Rustom Mody
On Monday, September 11, 2017 at 12:51:59 PM UTC+5:30, Gregory Ewing wrote: > Chris Angelico wrote: > > Async functions in > > JS are an alternative to callback hell; most people consider async > > functions in Python to be an alternative to synchronous functions. > > What do you base that on? See

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-11 Thread Rustom Mody
On Monday, September 11, 2017 at 1:28:24 PM UTC+5:30, Marko Rauhamaa wrote: > Gregory Ewing: > > > Chris Angelico wrote: > >> Async functions in > >> JS are an alternative to callback hell; most people consider async > >> functions in Python to be an alternative to synchronous functions. > > > > W

Re: String to Dictionary conversion in python

2017-09-15 Thread Rustom Mody
On Saturday, September 16, 2017 at 2:04:39 AM UTC+5:30, [email protected] wrote: > On Thursday, September 14, 2017 at 11:33:56 PM UTC-7, Ian wrote: > > On Fri, Sep 15, 2017 at 12:01 AM, wrote: > > > Hi, > > > > > > Can anyone help me in the below issue. > > > > > > I need to convert string to dicti

Re: [Tutor] beginning to code

2017-09-18 Thread Rustom Mody
On Monday, September 18, 2017 at 5:23:49 PM UTC+5:30, Rick Johnson wrote: > On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > > > > I would agree that testing any of those for '== True' or > > > > the like is pointless redundancy, > > > > > > But what's wrong wit

Re: [Tutor] beginning to code

2017-09-18 Thread Rustom Mody
On Monday, September 18, 2017 at 6:25:09 PM UTC+5:30, Rustom Mody wrote: > On Monday, September 18, 2017 at 5:23:49 PM UTC+5:30, Rick Johnson wrote: > > On Sunday, September 17, 2017 at 8:51:38 PM UTC-5, INADA Naoki wrote: > > > > > > > > > > > > &g

Re: [Tutor] beginning to code

2017-09-19 Thread Rustom Mody
On Tuesday, September 19, 2017 at 4:41:01 PM UTC+5:30, Antoon Pardon wrote: > Op 19-09-17 om 11:22 schreef Steven D'Aprano: > > Except for bools, where people freak out and are convinced the world will > > end if you just ask an object "are you true or false?". > > > > Perhaps just a *tiny* exagg

grapheme cluster library

2017-10-20 Thread Rustom Mody
Is there a recommended library for manipulating grapheme clusters? In particular, in devanagari क् + ि = कि in (pseudo)unicode names KA-letter + I-sign = KI-composite-letter I would like to be able to handle KI as a letter rather than two code-points. Can of course write an automaton to group bu

Re: grapheme cluster library

2017-10-21 Thread Rustom Mody
On Saturday, October 21, 2017 at 11:51:57 AM UTC+5:30, Chris Angelico wrote: > On Sat, Oct 21, 2017 at 3:25 PM, Stefan Ram wrote: > > Rustom Mody writes: > >>Is there a recommended library for manipulating grapheme clusters? > > > > The Python Library has a module

Re: grapheme cluster library

2017-10-21 Thread Rustom Mody
On Saturday, October 21, 2017 at 9:22:24 PM UTC+5:30, MRAB wrote: > On 2017-10-21 05:11, Rustom Mody wrote: > > Is there a recommended library for manipulating grapheme clusters? > > > > In particular, in devanagari > > क् + ि = कि > > in (pseudo)unicode

  1   2   3   4   5   6   7   8   9   10   >