Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34079

RE: re.search when used within an if/else fails

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ramit.prasad@jpmorgan.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'alignment': 0.07; 'completeness': 0.07; 'parser': 0.07; 'missed': 0.09; 'python': 0.09; 'disregard': 0.09; 'received:155': 0.09; 'tab': 0.09; '(python)': 0.16; 'dependent.': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'editor,': 0.16; 'expands': 0.16; 'f.read()': 0.16; 'from:addr:jpmorgan.com': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'securities,': 0.16; 'subject:fails': 0.16; 'subject:when': 0.16; 'tabs': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; 'expanded': 0.17; '>>>': 0.18; 'to:name:python-list@python.org': 0.20; '3.x': 0.22; 'received:169.254': 0.24; 'accuracy': 0.27; 'subject:/': 0.28; 'character.': 0.29; 'editors': 0.29; 'convert': 0.29; 'received:169': 0.29; 'header:Received:8': 0.30; 'code': 0.31; 'print': 0.32; 'to:addr:python-list': 0.33; 'skip:d 20': 0.34; 'there': 0.35; 'next': 0.35; 'charset:us-ascii': 0.36; 'editor': 0.37; 'does': 0.37; 'previous': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; 'helps': 0.63; 'information,': 0.63; 'url:email': 0.63; 'show': 0.63; 'legal': 0.65; 'subject': 0.66; 'talking': 0.66; 'purchase': 0.67; 'believe': 0.69; 'sale': 0.76; 'received:169.254.8': 0.84; 'subject:else': 0.84; 'visually': 0.84; 'dennis': 0.91
X-DKIM OpenDKIM Filter v2.1.3 sf3.jpmchase.com qATMv6Vr005653
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1354229826; bh=in/ywH2449DixWmiaSaPooLOH9aTCieiZ1qGnTPIfnM=; h=From:To:Subject:Date:Message-ID:References: Content-Transfer-Encoding:MIME-Version:Content-Type; b=S37zRmCxMvCA/R8j1DW5t6MDFXgNN6Mujv3i57AE50ephTyrnySxQbWwNKkgKfHOD TiRocu9fGxvqFYSUALd7giq3NLjTvOPtgwAbfYseawKR1R8hyUnU5l+O1bA+6d1+X1 pm+8Z7axJ241D/0yVVRzRLDgufStfriacP9IFHVE=
From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: re.search when used within an if/else fails
Thread-Topic re.search when used within an if/else fails
Thread-Index AQHNzcdZcFFfaT9Fc0qKvMMNsVHKnJgBaOGwgAAEkBA=
Date Thu, 29 Nov 2012 22:57:00 +0000
References <a14abf7d-b231-4cf5-989a-f38e6307867d@googlegroups.com> <mailman.82.1353440253.29569.python-list@python.org> <2930dc36-9d8f-411d-aa7a-272fe4885ec5@i5g2000yqh.googlegroups.com> <mailman.192.1353560449.29569.python-list@python.org> <11835b30-3448-45cc-9ae5-46d651f93429@googlegroups.com> <CALwzid=MW+c2F_Z_2=npC=Z41FJuFOXYMBJ0N-fGxycJE53t4A@mail.gmail.com> <mailman.346.1354133357.29569.python-list@python.org> <50b68476$0$29994$c3e8da3$5496439d@news.astraweb.com> <k4adb8trk5gna1qbo92ejs3281l13415h2@invalid.netcom.com>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [10.67.79.47]
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-DLP-FWD Yes
Content-Type text/plain; charset="us-ascii"
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.371.1354229829.29569.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1354229829 news.xs4all.nl 6873 [2001:888:2000:d::a6]:54343
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:34079

Show key headers only | View raw


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 <tab> is expanded to 8-spaces -- NOT TO NEXT MULTIPLE OF
> > 8...
> 
> A tab is *one* character. Your *editor* may show tabs visually
> "expanded" or convert them to spaces. This is entirely editor dependent.
> My current (python) editor, does expands tabs to the next *multiple* of 4.
> It helps keep code aligned, and I have no need for 4 hard spaced tabs
> without regards to alignment (yet). I have had editors that did 4 hard
> spaced tabs, so it might be a developer/application preference.
> 
> >>> with open(r'c:\ramit\mix_tab_space.txt')as f:
> ...     d = f.read()
> ...
> >>> print repr(d)
> '\tblah\n    test\n\t'
> >>> print d[0] + 'goo'
> 	goo
> >>> print repr(d[0] + 'goo')
> '\tgoo'

Apologies, I missed that it was talking about the parser
and not editor/file. Please disregard my previous post. 


~Ramit


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

re.search when used within an if/else fails Kevin T <kevinintx@gmail.com> - 2012-11-19 15:43 -0800
  Re: re.search when used within an if/else fails MRAB <python@mrabarnett.plus.com> - 2012-11-20 01:21 +0000
  Re: re.search when used within an if/else fails Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-20 01:24 +0000
    Re: re.search when used within an if/else fails Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-20 01:29 +0000
      Re: re.search when used within an if/else fails Kevin T <kevinintx@gmail.com> - 2012-11-20 11:09 -0800
        Re: re.search when used within an if/else fails Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-20 12:37 -0700
          Re: re.search when used within an if/else fails Kevin T <kevinintx@gmail.com> - 2012-11-21 08:41 -0800
            Re: re.search when used within an if/else fails Chris Angelico <rosuav@gmail.com> - 2012-11-22 16:00 +1100
              Re: re.search when used within an if/else fails Kevin T <kevinintx@gmail.com> - 2012-11-28 11:39 -0800
                Re: Re: re.search when used within an if/else fails Evan Driscoll <driscoll@cs.wisc.edu> - 2012-11-28 14:08 -0600
                Re: re.search when used within an if/else fails Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-28 21:39 +0000
                Re: re.search when used within an if/else fails Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-28 19:20 -0500
                Re: re.search when used within an if/else fails Duncan Booth <duncan.booth@invalid.invalid> - 2012-11-29 09:34 +0000
                Re: re.search when used within an if/else fails Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-29 13:38 -0500
                RE: re.search when used within an if/else fails "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-29 22:57 +0000
                RE: re.search when used within an if/else fails "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-29 22:53 +0000
              Re: re.search when used within an if/else fails Kevin T <kevinintx@gmail.com> - 2012-11-28 11:39 -0800
                Re: re.search when used within an if/else fails Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-28 20:50 +0000
        Re: re.search when used within an if/else fails Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-20 12:39 -0700

csiph-web