[Python-Dev] surprised to "++" and "--"
Hi, I know that there is no "++" or "--" operator in python, but if "var++" or something like that in my code(you know, most of C/C++ coders may like this),there is nothing wrong reported and program goes on just like expected!! This is obscure, maybe a bug.___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] surprised to "++" and "--"
I know that there is no "++" or "--" operator in python, but if "var++" or something like that in my code(you know, most of C/C++ coders may like this),there is nothing wrong reported and program goes on just like expected!! This is obscure, maybe a bug. Hi, Firstly, this list is for the development of Python, not with Python, questions about problems you're having should generally go to the users' list. Bug reports should go to the bug tracker at http://bugs.python.org/ However, in this particular case, there's no point submitting it; you have made a mistake somewhere. As you say, there is no ++ or -- unary postfix operator, but this DOES raise a SyntaxError: >>> var = 1 >>> var++ File "", line 1 var++ ^ SyntaxError: invalid syntax The prefix form is valid, as + and - are both valid prefix unary operators: >>> ++var 1 >>> --var 1 Which are equivalent to: >>> +(+1) 1 >>> -(-1) 1 If you were to try this with something that didn't implement __neg__ and __pos__, such as strings, you'd get: >>> ++var Traceback (most recent call last): File "", line 1, in ? TypeError: bad operand type for unary + Hope this clarifies things for you, Matthew ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] surprised to "++" and "--"
2009/9/23 Wee Binn : > I know that there is no "++" or "--" operator in python, but if "var++" > or something like that in my code(you know, most of C/C++ coders may like > this),there is nothing wrong reported and program goes on just like > expected!! > This is obscure, maybe a bug. You can not write "var++": >>> var = 5 >>> var++ File "", line 1 var++ ^ SyntaxError: invalid syntax >>> -- .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Summary of Python tracker Issues
ACTIVITY SUMMARY (09/18/09 - 09/25/09) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 2410 open (+34) / 16406 closed (+20) / 18816 total (+54) Open issues with patches: 955 Average duration of open issues: 667 days. Median duration of open issues: 423 days. Open Issues Breakdown open 2373 (+31) pending36 ( +3) Issues Created Or Reopened (54) ___ Socket error when launching IDLE 09/18/09 http://bugs.python.org/issue6941created 08jpurcell email.generator.Generator memory consumption 09/18/09 http://bugs.python.org/issue6942created rpatterson setup.py fails to find headers of system libffi 09/19/09 http://bugs.python.org/issue6943created Arfrever patch, easy socket.getnameinfo raises SystemError on bogus input 09/19/09 CLOSED http://bugs.python.org/issue6944created marienz patch pprint.pprint does not pprint unsortable dicts in Python 3 09/19/09 CLOSED http://bugs.python.org/issue6945created aronacher Document: Missing link to datetime.datetime 09/19/09 CLOSED http://bugs.python.org/issue6946created ocean-city Fix distutils test on windows (SO extension) 09/19/09 CLOSED http://bugs.python.org/issue6947created ocean-city patch list 09/19/09 CLOSED http://bugs.python.org/issue6948created nutregina Support Berkeley DB 4.8 09/19/09 http://bugs.python.org/issue6949created Arfrever patch online documentation error: PyObject* PyByteArray_Resize(PyObjec 09/19/09 CLOSED http://bugs.python.org/issue6950created kaizhu OS X IDLE has two Preferences menus on 2.6.x with Tk > 8.4.7 09/20/09 CLOSED http://bugs.python.org/issue6951created ned.deily easy deprecated conversion from string constant to char * 09/20/09 http://bugs.python.org/issue6952created barry-scott readline documenation needs work 09/20/09 http://bugs.python.org/issue6953created ronaldoussoren DISTUTILS_DEBUG causes stack trace, really simple fix09/20/09 CLOSED http://bugs.python.org/issue6954created nedbat Max() Not Working Properly 09/21/09 CLOSED http://bugs.python.org/issue6955created lovelygoo2 Test creation in unittest.TestProgram should be done in one plac 09/21/09 http://bugs.python.org/issue6956created michael.foord Extension modules fail to build on OS X 10.6 using python.org 2. 09/21/09 http://bugs.python.org/issue6957created ned.deily Add Python command line flags to configure logging 09/21/09 http://bugs.python.org/issue6958created theller patch OS X 10.6 / Snow Leopard: building 2.6 maintenance release fails 09/21/09 CLOSED http://bugs.python.org/issue6959created cscscs
[Python-Dev] help required
Hi,
I dont know it is the right place to post this question. I need help to change
one search code line . can you help me please.
here is my search method code:
search=re.compile("^#acl InternationalGroup.*\n", re.M).search(pagetext)
if search:
ret=search.group()
here i am searching for "#acl InternationalGroup" in the pageText and when it
true is then give me search group.
I want to change this for following requirement:
I want to search for "#acl InternationalGroup" and "CatInternational" in the
pageText.
when "#acl InternationalGroup" is not there but "CatInternational" is there.
then return me search group.
I shall be thankful to you for any help.
Best Regards,
Waqas
_
Invite your mail contacts to join your friends list with Windows Live Spaces.
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] help required
waqas ahmad wrote:
Hi,
I dont know it is the right place to post this question. I need help
to change one search code line . can you help me please.
Hello Waqas,
This is a list for the development *of* Python, not for development with
Python. More appropriate lists, where hopefully there will be lots of
people willing to help you, are python-list and python-tutor:
http://mail.python.org/mailman/listinfo/python-list
http://mail.python.org/mailman/listinfo/tutor
Or the google groups gateway for the Python-list (comp.lang.python):
http://groups.google.com/group/comp.lang.python/topics
All the best,
Michael Foord
here is my search method code:
search=re.compile("^#acl InternationalGroup.*\n", re.M).search(pagetext)
if search:
ret=search.group()
here i am searching for "#acl InternationalGroup" in the pageText and
when it true is then give me search group.
I want to change this for following requirement:
I want to search for "#acl InternationalGroup" and
"CatInternational" in the pageText.
when "#acl InternationalGroup" is not there but "CatInternational" is
there. then return me search group.
I shall be thankful to you for any help.
Best Regards,
Waqas
Invite your mail contacts to join your friends list with Windows Live
Spaces. It's easy! Try it!
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] help required
waqas ahmad wrote:
Hi,
I dont know it is the right place to post this question. I need help to
change one search code line . can you help me please.
here is my search method code:
search=re.compile("^#acl InternationalGroup.*\n", re.M).search(pagetext)
if search:
ret=search.group()
here i am searching for "#acl InternationalGroup" in the pageText and
when it true is then give me search group.
I want to change this for following requirement:
I want to search for "#acl InternationalGroup" and "CatInternational"
in the pageText.
when "#acl InternationalGroup" is not there but "CatInternational" is
there. then return me search group.
I shall be thankful to you for any help.
I'm not clear whether you want the search to succeed if pageText
contains either, or if pageText contains "CatInternational" but not
"#acl InternationalGroup".
Whichever you want, you could use 2 simple separate regular expressions
or 1 more complicated regular expression.
Search for either:
search = re.compile("^#acl InternationalGroup.*\n", re.M).search(pagetext)
if not search:
search = re.compile("^CatInternational.*\n", re.M).search(pagetext)
if search:
ret = search.group()
Search for one but not the other:
search = re.compile("^CatInternational.*\n", re.M).search(pagetext)
if search:
search_2 = re.compile("^#acl InternationalGroup.*\n",
re.M).search(pagetext)
if not search_2:
ret = search.group()
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.6.3
On Sep 19, 2009, at 2:51 PM, qwavel wrote: What about this bug: http://bugs.python.org/issue3890 It appears to me that the SSL module is broken in the 2.6.x line on all platforms in one of its most common uses (non-blocking). It also seems that the problem and solution are well understood, so the solution would make a good candidate for 2.6.3? I made this a release blocker, but reserve the right to bump it down again. -Barry PGP.sig Description: This is a digitally signed message part ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.6.3
On Fri, Sep 25, 2009 at 3:14 PM, Barry Warsaw wrote: > On Sep 19, 2009, at 2:51 PM, qwavel wrote: > >> What about this bug: >> http://bugs.python.org/issue3890 >> It appears to me that the SSL module is broken in the 2.6.x line on all >> platforms in one of its most common uses (non-blocking). It also seems >> that >> the problem and solution are well understood, so the solution would make a >> good candidate for 2.6.3? > > I made this a release blocker, but reserve the right to bump it down again. > > -Barry > Barry - this is your call, but I think http://bugs.python.org/issue6990 should be a rel blocker too. jesse ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] thinking about 2.7
[email protected] writes: > It's easy for someone to volunteer to set up a new slave. It's even > easy to make sure it keeps running for 6 months. But it's not as easy > to keep it running indefinitely. This isn't about the software > involved (at least not entirely). It's about someone paying attention > to whether the slave restarts on reboots, and about paying attention > to whether the slave host has lots its network connection, or been > decomissioned, or whether a system upgrade disabled the slave, or > whatever other random administrative-like tasks are necessary to keep > things running. Casual volunteers generally just won't keep up with > these tasks. One suggestion from my perspective as a buildbot maintainer who, IMHO, has maintained generally stable and fairly well monitored buildbots (XP-4 and FreeBSD) for a while now I don't know if it's possible but it would be great if the buildbot master could send an email to a buildbot maintainer if it thinks a buildbot is down. There have actually been times in the past when from the perspective of my buildbot things were just dandy, but the master showed it as down. Stopping and restarting the buildbot, forcing it to reconnect, cleaned things up, but I have to monitor the web status page which is a manual process. And since it's the master's perspective that really matters when it comes to a buildbot being available, getting status from the master would be very helpful. -- David ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.6.3
On Sep 25, 2009, at 4:18 PM, Jesse Noller wrote: Barry - this is your call, but I think http://bugs.python.org/issue6990 should be a rel blocker too. Done. -Barry PGP.sig Description: This is a digitally signed message part ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] thinking about 2.7
> I don't know if it's possible but it would be great if the buildbot > master could send an email to a buildbot maintainer if it thinks a > buildbot is down. I think it should be possible to detect that. I wouldn't recommend immediate reaction, but rather a delayed reaction (say, 12h). Buildbot is very well capable of tracking timeouts of many hours. I could put that on my list of things to do, but if you beat me to it, that would be even better. One problem is that the buildbot configuration currently doesn't have email address of all slave operators, but that would be possible to add. > And since it's the master's perspective that really matters when it > comes to a buildbot being available, getting status from the master > would be very helpful. This sounds very reasonable. I'll ask on the buildbot list; maybe somebody already has that implemented. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] surprised to "++" and "--"
I don't think this is quite true. ++var and --var are legal albeit redundant expressions that equal var var++ and var-- cause a SyntaxError, as they should. Rob - Original Message - From: Wee Binn To: [email protected] Sent: Wednesday, September 23, 2009 4:47 AM Subject: [Python-Dev] surprised to "++" and "--" Hi, I know that there is no "++" or "--" operator in python, but if "var++" or something like that in my code(you know, most of C/C++ coders may like this),there is nothing wrong reported and program goes on just like expected!! This is obscure, maybe a bug. -- ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
