Dennis Lee Bieber wrote:
>
> Unless there has been a major change in the parser... (I still don't
> have Python 3.x installed)
>
> I believe is expanded to 8-spaces -- NOT TO NEXT MULTIPLE OF
> 8...
A tab is *one* character. Your *editor* may show tabs visually
"expanded" or conver
Ramit Prasad wrote:
>
> Dennis Lee Bieber wrote:
> >
> > Unless there has been a major change in the parser... (I still don't
> > have Python 3.x installed)
> >
> > I believe is expanded to 8-spaces -- NOT TO NEXT MULTIPLE OF
> > 8...
>
> A tab is *one* character. Your *editor* may show
Dennis Lee Bieber wrote:
> Unless there has been a major change in the parser... (I still don't
> have Python 3.x installed)
>
> I believe is expanded to 8-spaces -- NOT TO NEXT MULTIPLE OF
> 8...
>
Certainly in Python 2.7 that's not the case: the tab expands to the next
multiple o
On Wed, Nov 28, 2012 at 5:20 PM, Dennis Lee Bieber wrote:
> On 28 Nov 2012 21:39:03 GMT, Steven D'Aprano
> declaimed the following in
> gmane.comp.python.general:> py> if True:
> > ... if True: # tab
> > ... pass # tab, then four spaces
> > ... pass # two spaces, tab, four s
On Thu, Nov 29, 2012 at 8:39 AM, Steven D'Aprano
wrote:
> Perhaps it would be nice if Python honoured a directive setting indent
> style to spaces or indents, as it honours source code encoding lines:
>
> # -*- indent: -*-
>
> Where could be one of:
>
> space[s]Only accept spaces in inde
On Wed, 28 Nov 2012 14:08:15 -0600, Evan Driscoll wrote:
> I'm only entering this thread now so I'm not really in context, but
> you're correct; in Python 3, -tt is set by default, which makes illegal
> mixing an error.
>
> However, not all mixing is illegal: what it means by "code that
> illegal
On Wed, 28 Nov 2012 11:39:48 -0800, Kevin T wrote:
> with other languages i always expand tabs to spaces. the vi plugin does
> do this properly. if i change all indents to be spaces only will python
> behave? i inherited a good deal of the code that i am using, which is
> tab based.
Python wil
On 11/28/2012 01:57 PM, Ian Kelly wrote:
> Yes, it's best to use either tabs-only or spaces-only. Quoting from PEP
> 8 on the subject:
>
> Never mix tabs and spaces.
>
> The most popular way of indenting Python is with spaces only. The
> second-most popular way is with tabs only. Cod
On Wed, Nov 28, 2012 at 12:39 PM, Kevin T wrote:
> with other languages i always expand tabs to spaces. the vi plugin does
do this properly. if i change all indents to be spaces only will python
behave? i inherited a good deal of the code that i am using, which is tab
based.
Yes, it's best to
I agree. Being relatively new to python, i was not sure of quirks so i posted
the original code.
I did find the real issue, as I found another loop that was not being executed
properly.
It turns out that if the indent started with spaces and ended with tabs,
neither eclipse or command line e
On Thu, Nov 22, 2012 at 3:41 AM, Kevin T wrote:
> I went back and tried version a again, blam it is/does work now ?!?!?
> I am not sure what changed but version a was the original code that
> wouldn't work. All the examples i had read, showed version a as a
> working version. I spent significant
On Nov 20, 1:37 pm, Ian Kelly wrote:
> On Tue, Nov 20, 2012 at 12:09 PM, Kevin T wrote:
> > #if re.search( "rsrvd", sigName ) : #version a
> > #if re.search( "rsrvd", sigName ) == None : #version b
> > if re.search( "rsrvd", sigName ) is None : #version bb
> > print sigName
> > newVal
On Tue, Nov 20, 2012 at 12:37 PM, Ian Kelly wrote:
> On Tue, Nov 20, 2012 at 12:09 PM, Kevin T wrote:
>> #if re.search( "rsrvd", sigName ) : #version a
>> #if re.search( "rsrvd", sigName ) == None : #version b
>> if re.search( "rsrvd", sigName ) is None : #version bb
>>print sigName
>>
On Tue, Nov 20, 2012 at 12:09 PM, Kevin T wrote:
> #if re.search( "rsrvd", sigName ) : #version a
> #if re.search( "rsrvd", sigName ) == None : #version b
> if re.search( "rsrvd", sigName ) is None : #version bb
>print sigName
>newVal = "%s%s" % ('1'*signal['bits'] , newVal )
> #else
On Monday, November 19, 2012 7:29:20 PM UTC-6, Steven D'Aprano wrote:
> On Tue, 20 Nov 2012 01:24:54 +, Steven D'Aprano wrote:
>
>
>
> - use "if something is None", not == None.
>
>
> Steven
i will not include line #'s in the future, point taken
i will change ==/!= to is/is not as most pe
On Mon, 19 Nov 2012 15:43:10 -0800, Kevin T wrote:
> python version 2.4.3, yes i know that it is old. getting the sysadmin
> to update the OS requires a first born.
>
> with the following code..
> for signal in register['signals'] :
>
> 351 sigName = signal['fu
On Tue, 20 Nov 2012 01:24:54 +, Steven D'Aprano wrote:
> Your code is mangled to the point of unreadability.
Ah, never mind, that's *my* fault, not yours. Or rather, my news reader
software. Sorry about the noise.
The rest of my post still stands:
- simplify your example to the simplest e
On 2012-11-19 23:43, Kevin T wrote:
python version 2.4.3, yes i know that it is old. getting the sysadmin to
update the OS requires a first born.
with the following code..
for signal in register['signals'] :
351 sigName = signal['functionName']
352
18 matches
Mail list logo