Re: [Tutor] Notepad++ question

2012-06-07 Thread Dave Angel
On 06/07/2012 02:36 PM, Alexander Quest wrote: > Ok, thanks guys. I also had one more quick question regarding a piece of > boilerplate code: > To get a response, you will needs to leave your question at the python tutor newsgroup. We are part of a group, not offering private advice. Normally,

Re: [Tutor] special attributes naming confusion

2012-06-07 Thread Prasad, Ramit
> >> That is, for loops first try to build an iterator by calling __iter__, and > if > >> that fails they try the sequence protocol obj[0], obj[1], obj[2], ... > > > > So...I could instead write __getitem__ for the same effect? > > > Er, no... __getitem__ and __iter__ do very different things. __

Re: [Tutor] special attributes naming confusion

2012-06-07 Thread Emile van Sebille
On 6/6/2012 4:28 PM Steven D'Aprano said... Prasad, Ramit wrote: That is, for loops first try to build an iterator by calling __iter__, and if that fails they try the sequence protocol obj[0], obj[1], obj[2], ... So...I could instead write __getitem__ for the same effect? Er, no... __getite

Re: [Tutor] Notepad++ question

2012-06-07 Thread Michael M Mason
Marc Tompkins wrote on 07 June 2012 at 08:53:- > In Notepad++, select Settings/Preferences.  > There's a tab called "Language Menu/Tab Settings" (they've put the two things > on > one tab to save space; the tab settings are on the right side.)  You'll find a > setting for "Tab size"; the default

Re: [Tutor] Notepad++ question

2012-06-07 Thread Brad Hudson
I don't use notepad or notepad++, so I don't know the settings. However, if you're familiar with vi/vim, you can download the CLI from www.vim.org for almost any flavor OS and it works quite well on Windows. BTW: you can customize your settings to use spaces instead of tabs, among others, which is

Re: [Tutor] Tutor Digest, Vol 100, Issue 22

2012-06-07 Thread kala Vinay
Dear All, credativ India specialized in open source, conducting a two days course on Python Programming on 27th and 28th June 2012. Interested candidates can contact: train...@credativ.in Regards, Vijayakala ___ Tutor maillist - Tutor@python.org T

Re: [Tutor] Notepad++ question

2012-06-07 Thread Jonathan Bishop
Hi, as a Python beginner myself, I started out using Geany IDE. It was pretty cool editor but it caused me indentation hell! Since then I have moved to eclipse with the pydev plugin and found it much friendlier when dealing with indentation problems. But each to there own! Notepad!! is a sweet edit

Re: [Tutor] Notepad++ question

2012-06-07 Thread Marc Tompkins
On Thu, Jun 7, 2012 at 12:41 AM, Alan Gauld wrote: > This is almost certainly down to mixing tabs and spaces. > You can mix them in a file but not within a block. (And > even then I would recommend sticking to just one style) > Some editors make it worse by autoindenting with a mixture > of tabs a

Re: [Tutor] Notepad++ question

2012-06-07 Thread Alan Gauld
On 07/06/12 05:29, Alexander Quest wrote: Hey all; my question is regarding editing Python code in Notepad++. When I run this piece of code in Notepad++: def fix_start(s): var1 = s[0] var2 = "*" var3 = s.replace(var1, var2) return var3 I get an indentation error, which reads: