Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34081
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'alignment': 0.07; 'completeness': 0.07; 'python': 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:169.70': 0.16; 'received:169.70.184': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'securities,': 0.16; 'space)': 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; 'input': 0.18; '(or': 0.18; 'to:name:python-list@python.org': 0.20; '3.x': 0.22; 'received:169.254': 0.24; 'second': 0.24; 'header:In-Reply-To:1': 0.25; 'accuracy': 0.27; 'subject:/': 0.28; 'character.': 0.29; 'concern': 0.29; 'editors': 0.29; 'spaces': 0.29; 'convert': 0.29; 'received:169': 0.29; 'source': 0.29; 'header:Received:8': 0.30; 'code': 0.31; 'file': 0.32; 'print': 0.32; 'mixed': 0.33; 'to:addr :python-list': 0.33; 'skip:d 20': 0.34; 'text': 0.34; 'there': 0.35; 'next': 0.35; 'but': 0.36; 'anything': 0.36; 'charset:us- ascii': 0.36; 'editor': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'space': 0.39; 'your': 0.60; 'first': 0.61; 'helps': 0.63; 'information,': 0.63; 'url:email': 0.63; 'show': 0.63; 'confirm': 0.64; 'legal': 0.65; 'due': 0.66; 'subject': 0.66; 'purchase': 0.67; 'believe': 0.69; 'eight': 0.71; '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 qATMrRQK032061 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1354229607; bh=RfNdc9uphLIFNJtUxl3+naSWdW/2Md7H8jPzHyF5RQw=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=ZP0C6Db+ga9dau2ydIkTRk04jheU0JH7EB9/aeHqdkl0JGOg1ze5FSozT9rsxrnZX FhMH0Mca17m0teWlMeAwe5ndzHFCqwii4Gqu6h9KothpWzBU5ImrxcUWHR0sj+Px2l bxjh3KUvo3WIJjiYCW94/vHKFhGTFmAqAnO1d+j4= |
| 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 | AQHNzcdZcFFfaT9Fc0qKvMMNsVHKnJgBaOGw |
| Date | Thu, 29 Nov 2012 22:53:20 +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> |
| In-Reply-To | <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.373.1354230801.29569.python-list@python.org> (permalink) |
| Lines | 28 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1354230801 news.xs4all.nl 6875 [2001:888:2000:d::a6]:34192 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:34081 |
Show key headers only | View raw
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' > > So the first is 8+4 => 12 spaces, the second is 2+8+4 => 14 spaces. > > Does 2 + <tab> + 2 vs 4 + <tab> vs <tab> + 4 succeed? That would > confirm the treatment. > > The main concern with mixed tab and spaces, as I recall, was due to > having /editors/ and /terminals/ configured to show <tab> as a four > space (or anything other than an eight space) increment; so visually > four spaces and one <tab> might look the same... One user might have the > editor showing 4-space indents on <tab> but entering text using 4 spaces > on input -- which now is mis-aligned if the source file HAD <tab> in it. ~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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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