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,
> >> 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. __
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
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
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
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
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
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
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: