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


Groups > comp.lang.python > #81495

FW: Unexpexted behaviot of python operators on list

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <prvs=399ca9147=archana.pandey.2@morpho.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.044
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'differently': 0.07; 'email name:[cid:image001.png': 0.09; 'mail:': 0.09; 'python': 0.11; 'windows': 0.15; "'+'": 0.16; '63,': 0.16; 'behave': 0.16; 'mob:': 0.16; 'mutable': 0.16; 'subject:operators': 0.16; 'whatsoever': 0.16; 'subject:python': 0.16; 'proprietary': 0.16; 'module': 0.19; 'filename:fname:image001.png': 0.19; 'to:name:python- list@python.org': 0.22; '+91': 0.24; 'subject:list': 0.30; 'division': 0.31; 'object.': 0.31; 'operators': 0.31; 'received:10.20': 0.33; 'received:fr': 0.33; 'copying': 0.34; 'problem': 0.35; 'india': 0.35; 'except': 0.35; 'url:rec-html40': 0.35; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'url:microsoft': 0.37; 'list': 0.37; 'received:10': 0.37; 'url:office': 0.38; 'to:addr:python-list': 0.38; 'url:schemas': 0.38; 'url:omml': 0.39; 'url:2004': 0.39; 'delete': 0.39; 'url:12': 0.39; 'to:addr:python.org': 0.39; 'received:unknown': 0.61; 'corporation': 0.61; 'strictly': 0.61; 'received:217': 0.63; 'notified': 0.63; 'kind': 0.63; 'tel:': 0.63; 'virus:src="cid:': 0.66; 'content-type:multipart/related': 0.67; 'sector': 0.72; 'archana': 0.84; 'thereto': 0.84
X-IronPort-AV E=Sophos;i="5.07,454,1413237600"; d="png'150?scan'150,208,217,150";a="34557965"
From "PANDEY2 Archana (MORPHO)" <archana.pandey.2@morpho.com>
To "python-list@python.org" <python-list@python.org>
Date Tue, 25 Nov 2014 10:23:59 +0100
Subject FW: Unexpexted behaviot of python operators on list
Thread-Topic Unexpexted behaviot of python operators on list
Thread-Index AdAIkUhghNJsC/t5QMyscyO+Pu4+qAAABwuA
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach yes
X-MS-TNEF-Correlator
acceptlanguage en-US
Content-Type multipart/related; boundary="_004_7E0894E94554B548A261863FD8CE7824479D97FAE5Y000XAKV01rd1_"; type="multipart/alternative"
MIME-Version 1.0
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16274.1416907513.18130.python-list@python.org> (permalink)
Lines 391
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416907513 news.xs4all.nl 2921 [2001:888:2000:d::a6]:44005
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81495

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello

I hereby would like to share the problem I have found regarding python list implementation:-

As per python documentation python list is mutable data object.

That problem I found with the list is that is behaves differently when we use '+=' and '+'  '=' operators separately.
For example-
a=a+1 and a +=1  both behave in same way for all data types except python list

Please find the attached module and execute it on windows python32, See the difference in output.


Kind Regards


[cid:image001.png@01D008BC.95CE3F20]


Syscom Corporation Limited

Morpho e-Documents Division

D-216, Sector 63, Noida,

Uttar Pradesh, 201301, India








Archana Pandey

Software Engineer-Payment/ID Noida
Tel: +91 (120) 4072 882

Mob: + 91 78 38 207 829

Mail: archana.pandey.2@morpho.com<mailto:archana.pandey.2@morpho.com>




#
" This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
#

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


Thread

FW: Unexpexted behaviot of python operators on list "PANDEY2 Archana (MORPHO)" <archana.pandey.2@morpho.com> - 2014-11-25 10:23 +0100
  Re: FW: Unexpexted behaviot of python operators on list Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-25 22:40 +1100
    Re: FW: Unexpexted behaviot of python operators on list Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-25 12:20 +0000
      Re: FW: Unexpexted behaviot of python operators on list Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-25 13:07 +0000

csiph-web