[issue38738] Fix formatting of True and False

2022-03-04 Thread miss-islington
miss-islington added the comment: New changeset fa69ec89393549a18944b3b92943709dac56a36a by Miss Islington (bot) in branch '3.10': bpo-38738: Fix formatting of True and False in the threading documentation (GH-31678) https://github.com/python/cpython/commit

[issue38738] Fix formatting of True and False

2022-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 46a116c1c9f6b60a3d35ab9a419f8eee5de2542e by Géry Ogam in branch 'main': bpo-38738: Fix formatting of True and False in the threading documentation (GH-31678) https://github.com/python/cpython/commit/46a116c1c9f6b60a3d35ab9a419f8eee5de2542e

[issue38738] Fix formatting of True and False

2022-03-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +29810 pull_request: https://github.com/python/cpython/pull/31690 ___ Python tracker

[issue38738] Fix formatting of True and False

2022-03-04 Thread Géry
Change by Géry : -- nosy: +maggyero nosy_count: 4.0 -> 5.0 pull_requests: +29809 pull_request: https://github.com/python/cpython/pull/31678 ___ Python tracker ___

[issue46883] Add glossary entries to clarify the true/True and false/False distinction

2022-02-28 Thread Steven D'Aprano
Steven D'Aprano added the comment: Note also that this is mentioned here: https://docs.python.org/3/library/stdtypes.html#boolean-values "[True and False] are used to represent truth values (although other values can also be considered false or true)." although it is perhaps no

[issue46883] Add glossary entries to clarify the true/True and false/False distinction

2022-02-28 Thread Steven D'Aprano
New submission from Steven D'Aprano : There is a long-standing tradition, going back to Python 1.x days before we had dedicated True and False values, to use the lowercase "true" and "false" to mean *any value that duck-types as True* and *any value that duck-types as

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Eryk Sun
Eryk Sun added the comment: > True == False == False is really True == False and False == False > wich is False and True which is False Moreover, since the left-hand comparison is `True == False`, which evaluates to False, the right-hand comparison doesn't even get eva

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Pablo Galindo Salgado
;= z, except that y is evaluated only once (but in both cases z is not evaluated at all when x < y is found to be false). THis means that True == False == False is really True == False and False == False wich is False and True which is False -- ___

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg412963 ___ Python tracker ___ ___ Python-bugs-list

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Pablo Galindo Salgado
;= z, except that y is evaluated only once (but in both cases z is not evaluated at all when x < y is found to be false). THis means that True == False == False is really True == False and True == False wich is False and False which is False -- resolution: -> not a bug stage:

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread jung mo sohn
ts" or "license" for more information. >>> print(True == False == False) False However, in the openjdk1.8 version, the output is "true" as shown below. public class Test { public static void main(String[] args) throws Exception{ System.out.pri

[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-05 Thread Xavier Morel
Xavier Morel added the comment: > True is a boolean so ~True should return False according to me. That's be a BC break for no reason: if you want to invert a boolean you can just `not` it. > True is not the same as 1 For historical reasons, in Python it is: >>> bool.mro()

[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Narendra Madurkar
Narendra Madurkar added the comment: True is a boolean so ~True should return False according to me. True is not the same as 1 -- ___ Python tracker <https://bugs.python.org/issue45

[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: What were you expecting? I think those are correct. See: >>> ~1 -2 >>> ~0 -1 -- nosy: +eric.smith ___ Python tracker ___

[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Narendra Madurkar
New submission from Narendra Madurkar : ~(True) returns -2 ~(False) returns -1 -- messages: 403190 nosy: nmadurkar priority: normal severity: normal status: open title: ~(True) and ~(False) gives incorrect result ___ Python tracker <ht

[issue43276] add `false` and `true` keywords (aliases) for True and False

2021-02-20 Thread parsa mpsh
parsa mpsh added the comment: I sent a PR: https://github.com/python/cpython/pull/24600 -- ___ Python tracker ___ ___

[issue43276] add `false` and `true` keywords (aliases) for True and False

2021-02-20 Thread parsa mpsh
Change by parsa mpsh : -- pull_requests: +23378 pull_request: https://github.com/python/cpython/pull/24600 ___ Python tracker ___

[issue43276] add `false` and `true` keywords (aliases) for True and False

2021-02-20 Thread parsa mpsh
parsa mpsh added the comment: Also adding them as builtin keywords will make it easier than setting them as variables. in this method, we should define them everywhere, but in builtin type its easy. -- ___ Python tracker

[issue43276] add `false` and `true` keywords (aliases) for True and False

2021-02-20 Thread parsa mpsh
parsa mpsh added the comment: Yes i know this. but why not adding this builtin? this will be very nice! -- ___ Python tracker ___

[issue43276] add `false` and `true` keywords (aliases) for True and False

2021-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can do it yourself in your script. It is just two lines of code: true = True false = False And it works in all Python versions! -- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -&g

[issue43276] add `false` and `true` keywords (aliases) for True and False

2021-02-20 Thread parsa mpsh
New submission from parsa mpsh : I wanna add `true` and `false` aliases for `True` and `False` keywords. Currently my patch is ready and i will send it as a pull request. -- messages: 387411 nosy: parsampsh priority: normal severity: normal status: open title: add `false` and `true

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2020-10-18 Thread Irit Katriel
Irit Katriel added the comment: I think you may have meant this issue (which is not related to field()): from dataclasses import dataclass from typing import Callable @dataclass(init=True) class Foo: callback: Callable[[int], int] = lambda x: x**2 @dataclass(init=False) class Bar:

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2020-10-18 Thread Irit Katriel
Irit Katriel added the comment: If I change Foo in your code to: @dataclass(init=False) class Foo: callback: Callable[[int], int] = lambda x: x**2 Then the same TypeError exception is raised for Foo. If I then change it back (remove the init=False so that it picks up the

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-12-12 Thread Jeong-Min Lee
Change by Jeong-Min Lee : -- nosy: +falsetru ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-12-10 Thread PCManticore
Change by PCManticore : -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-12-06 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-12-01 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-11-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-11-30 Thread Kevin Shweh
should be clearer about how the default value/non-init field interaction behaves. -- components: Library (Lib) messages: 357669 nosy: Kevin Shweh priority: normal severity: normal status: open title: dataclass defaults behave inconsistently for init=True/init=False when default

[issue38738] Fix formatting of True and False

2019-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Vinay, Kyle and Terry for your review! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38738] Fix formatting of True and False

2019-11-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, thank you for carrying this through, including the backports. Ready to close? -- nosy: +terry.reedy ___ Python tracker ___

[issue38738] Fix formatting of True and False

2019-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 42b619ac9aa7f889dcd8eeb14d813f17468454d9 by Serhiy Storchaka in branch '3.7': [3.7] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17128) https://github.com/python/cpython/commit/42b619ac9aa7f889dcd8eeb14d813f17468454d9

[issue38738] Fix formatting of True and False

2019-11-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16637 pull_request: https://github.com/python/cpython/pull/17128 ___ Python tracker ___

[issue38738] Fix formatting of True and False

2019-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d360346640e19231032b072216195484fa2450b4 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17125) https://github.com/python/cpython/commit/d360346640e19231032b072216195484fa2450b4

[issue38738] Fix formatting of True and False

2019-11-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16633 pull_request: https://github.com/python/cpython/pull/17125 ___ Python tracker ___

[issue38738] Fix formatting of True and False

2019-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 138ccbb02216ca086047c3139857fb44f3dab1f9 by Serhiy Storchaka in branch 'master': bpo-38738: Fix formatting of True and False. (GH-17083) https://github.com/python/cpython/commit/138ccbb02216ca086047c3139857fb44f3dab1f9

[issue38738] Fix formatting of True and False

2019-11-08 Thread Vedran Čačić
Vedran Čačić added the comment: Very nice. I aplaud your return to the original Python terminology, of true and false as adjectives, and True and False as names for specific objects. Perlisms such as `truthy` or `that evaluates as True` simply make my head spin. I wrote one comment

[issue38738] Fix formatting of True and False

2019-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16593 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17083 ___ Python tracker

[issue38738] Fix formatting of True and False

2019-11-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR fixes some issues with True and False in the documentation: * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False litera

[issue36358] bool type does not support True or False as command line argv

2019-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is expected. bool('False') is True. You can write your own converter which returns True for 'True', False for 'False' and raise an exception otherwise. But it is more common to add a pair of options without arguments --foo/--no-foo

[issue36358] bool type does not support True or False as command line argv

2019-03-19 Thread Abhinav Gupta
) messages: 338321 nosy: Abhinav Gupta priority: normal severity: normal status: open title: bool type does not support True or False as command line argv type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <ht

[issue35117] set.discard should return True or False based on if element existed.

2018-11-01 Thread tzickel
tzickel added the comment: I would think that the .discard is the equivalent of .pop in dict. (instead of wasting time once checking and once removing, also the data in a set is the data, there is no value to check). Even the standard lib has lots of usage of dict.pop(key, None) to not

[issue35117] set.discard should return True or False based on if element existed.

2018-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: We already have ways to do it (use the in-operator to test membership or put a remove() call in a try/except). Since already we have ways to do it and since those patterns are rare in practice, an API extension doesn't seem warranted. Also, I don't

[issue35117] set.discard should return True or False based on if element existed.

2018-10-30 Thread Windson Yang
Windson Yang added the comment: I guess we can implement using ref_count? However, I agreed "The use of variables that haven't been defined or set (implicitly or explicitly) is almost always a bad thing in any language since it indicates that the logic of the program hasn't been thought

[issue35117] set.discard should return True or False based on if element existed.

2018-10-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35117] set.discard should return True or False based on if element existed.

2018-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: try: s.remove(x) except KeyError: # did not exist else: # existed But catching exception in Python is expensive. -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker

[issue35117] set.discard should return True or False based on if element existed.

2018-10-30 Thread tzickel
New submission from tzickel : Sometimes you want to do something based on if the item existed before removal, so instead of checking if it exists, then removing and doing something, if would be nice to make the function return True or False based on if the element existed

Re: Overriding True and False ?

2017-01-31 Thread jladasky
On Sunday, January 29, 2017 at 11:29:29 PM UTC-8, Irv Kalb wrote: > It seems very odd that Python allows you to override the values of > True and False. Hi Irv, Let me join the chorus of people who are encouraging you to switch to Python3, which corrects this problem. Overriding builti

Re: Overriding True and False ?

2017-01-30 Thread Christian Gollwitzer
Am 31.01.17 um 04:27 schrieb Ian Kelly: On Jan 30, 2017 6:07 PM, "Steve D'Aprano" wrote: Hey Ian, Your news reader or mail client has stopped quoting the text you are quoting, so it appears as if you have written it. See:

Re: Overriding True and False ?

2017-01-30 Thread Ben Finney
Ian Kelly writes: > Well, nuts. It looks fine in my client (the Gmail Android app) so I > guess this must be an issue of HTML versus text content. Unfortunately > the mobile client doesn't have any option for text-only that I can > find, so my options appear to be to

Re: Overriding True and False ?

2017-01-30 Thread Ian Kelly
On Jan 30, 2017 6:07 PM, "Steve D'Aprano" wrote: > Hey Ian, > > Your news reader or mail client has stopped quoting the text you are > quoting, so it appears as if you have written it. > > See: > > https://mail.python.org/pipermail/python-list/2017-January/719015.html

Re: Overriding True and False ?

2017-01-30 Thread Steve D'Aprano
On Tue, 31 Jan 2017 03:12 am, Ian Kelly wrote: > On Jan 30, 2017 1:32 AM, "Irv Kalb" wrote: > > I teach intro to programming using Python. In my first assignment, > students are asked to assign variables of different types and print out > the values. [...] Hey Ian, Your

Re: Overriding True and False ?

2017-01-30 Thread Ian Kelly
in the following for his/her interpretation of Booleans (Python 2.7): True = 'shadow' False = 'light' print "If the sun is behind a cloud, there is", True print "If it is a clear day, there is", False And it printed: If the sun is behind a cloud, there is shadow If it is a clear

Re: Overriding True and False ?

2017-01-30 Thread Ian Kelly
On Jan 30, 2017 2:00 AM, "Chris Angelico" wrote: (Interestingly, Ellipsis is not included in that.) Perhaps because it's rather unusual for a program to depend upon the value of Ellipsis. -- https://mail.python.org/mailman/listinfo/python-list

Re: Overriding True and False ?

2017-01-30 Thread Chris Angelico
On Mon, Jan 30, 2017 at 4:03 PM, Irv Kalb <i...@furrypants.com> wrote: > It seems very odd that Python allows you to override the values of True and > False. In the code, True and False were clearly recognized as keywords as > they were colored purple. But there was no error m

Re: Overriding True and False ?

2017-01-30 Thread Chris Angelico
On Mon, Jan 30, 2017 at 6:50 PM, Deborah Swanson <pyt...@deborahswanson.net> wrote: > Looks like the moral of the story is that in Python 2.7 you can redefine > keywords, so long as you don't get any syntax errors after (or during) > redefinition. The moral is actually that &q

Re: Overriding True and False ?

2017-01-29 Thread Ben Finney
Irv Kalb <i...@furrypants.com> writes: > I teach intro to programming using Python. […] Thank you for teaching Python to beginners! > It seems very odd that Python allows you to override the values of > True and False. Yes, it is. That's why Python 3 forbids it:: >

RE: Overriding True and False ?

2017-01-29 Thread Deborah Swanson
d Booleans) turned > in the following for his/her interpretation of Booleans (Python 2.7): > > True = 'shadow' > False = 'light' > print "If the sun is behind a cloud, there is", True > print "If it is a clear day, there is", False > > And it printed: > >

Re: Overriding True and False ?

2017-01-29 Thread INADA Naoki
It's fixed already in Python 3. Please use Python 3 when teaching to students. $ python3 Python 3.6.0 (default, Dec 24 2016, 00:01:50) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> True = "foo"

Overriding True and False ?

2017-01-29 Thread Irv Kalb
= 'shadow' False = 'light' print "If the sun is behind a cloud, there is", True print "If it is a clear day, there is", False And it printed: If the sun is behind a cloud, there is shadow If it is a clear day, there is light It seems very odd that Python allows you to overrid

Re: condition and True or False

2010-05-06 Thread Lawrence D'Oliveiro
In message 685761fe-b052-4d89-92d3-17d1f2a39...@p2g2000yqh.googlegroups.com, Paul McGuire wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False I

condition and True or False

2010-05-02 Thread Paul McGuire
While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False What is and True or False adding to this picture? The boolean expression part is already evaluating

Re: condition and True or False

2010-05-02 Thread Peter Otten
Paul McGuire wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False What is and True or False adding to this picture? The boolean expression part

Re: condition and True or False

2010-05-02 Thread Vito 'ZeD' De Tullio
Peter Otten wrote: def f(): big_beast = list(range(10**100)) return big_beast and True or False x = f() it would prevent that a big_beast reference becomes visible outside the function and allow for immediate release of its memory. what's wrong in bool(big_beast)? -- By ZeD

Re: condition and True or False

2010-05-02 Thread David Robinow
On Sun, May 2, 2010 at 1:14 PM, Paul McGuire pt...@austin.rr.com wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler:    x = boolean expression and True or False What is and True or False adding

Re: condition and True or False

2010-05-02 Thread Carl Banks
On May 2, 10:14 am, Paul McGuire pt...@austin.rr.com wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler:     x = boolean expression and True or False What is and True or False adding

Re: condition and True or False

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 10:14:44 -0700, Paul McGuire wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False What is and True or False adding

Re: condition and True or False

2010-05-02 Thread Patrick Maupin
On May 2, 12:14 pm, Paul McGuire pt...@austin.rr.com wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler:     x = boolean expression and True or False What is and True or False adding

Re: condition and True or False

2010-05-02 Thread John Machin
On May 3, 9:14 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: If it is any arbitrary object, then x and True or False is just an obfuscated way of writing bool(x). Perhaps their code predates the introduction of bools, and they have defined global constants True and False

Re: Is (-1 ==True) True or False? Neither

2009-01-25 Thread Steven D'Aprano
On Sun, 25 Jan 2009 03:07:04 +0200, Oktay Şafak wrote: The reason is that when someone writes (-1 == True) he is clearly, definitely, absolutely asking for a boolean comparison, not a numerical one. If I wrote (-1 == True), and I'm not sure why I would, I would expect to get the answer

Is (-1 ==True) True or False? Neither

2009-01-24 Thread oktaysafak
Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... >>> -1 == True False >>> -1 == False False This works though: >>> if -1: print "OK" OK After some head scratching, I reali

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Robert Kern
On 2009-01-24 17:00, oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... -1 == True False -1 == False False This works though: if -1: print OK OK After some head scratching, I

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Oktay Şafak
Robert Kern wrote: On 2009-01-24 17:00, oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... -1 == True False -1 == False False This works though: if -1: print OK OK After some

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Terry Reedy
oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... -1 == True False -1 == False False This works though: if -1: print OK OK After some head scratching, I realized

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Robert Kern
On 2009-01-24 19:07, Oktay Şafak wrote: Robert Kern wrote: On 2009-01-24 17:00, oktaysa...@superonline.com wrote: Hi all, I ran into a strange case. Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 ... -1 == True False -1 == False False This works

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Terry Reedy
and interpreter to weird code which should never be written. Well, I agree that explicit is better than implicit: when one wants to use the numerical values of True or False, he should make it explicit and use int(True) or int(False). The reason to make bool a subclass of int is to avoid having to do

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Oktay Şafak
I don't see how fixing this makes harder to treat True and False as first-class objects. If doing the right thing takes some special casing then be it, but I don't think it's so. True in ['something', False] In your semantics, this would evaluate to True because ('something' == True) is True

Re: Is (-1 ==True) True or False? Neither

2009-01-24 Thread Oktay Şafak
the numerical values of True or False, he should make it explicit and use int(True) or int(False). The reason to make bool a subclass of int is to avoid having to do that. You do not have to like this fact of Python but it has been decided and will not change. We never write counter += True

[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False

2008-07-12 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: r64903-64905 have the fixes for trunk, 3.0, and 2.5, respectively. Thanks for reporting this, Henk. Andrii, I never even looked at your patch since while I was evaluating the bug the problem was rather obvious and simple, as you said. =) Thanks

[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False

2008-07-12 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: -- resolution: accepted - fixed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3339 ___ ___ Python-bugs-list

[issue3339] dummy_thread LockType.acquire() always returns None, should be True or False

2008-07-11 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: -- assignee: - brett.cannon nosy: +brett.cannon ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3339 ___ ___

True of False

2007-09-27 Thread koutoo
I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run this, it runs, but nothing prints. What am I doing wrong

Re: True of False

2007-09-27 Thread Simon Brunning
On 9/27/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run

Re: True of False

2007-09-27 Thread skulka3
On Sep 27, 11:33 am, [EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run

Re: True of False

2007-09-27 Thread Marc 'BlackJack' Rintsch
On Thu, 27 Sep 2007 09:33:34 -0700, koutoo wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run

Re: True of False

2007-09-27 Thread Shriphani
[EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run this, it runs, but nothing

Re: True of False

2007-09-27 Thread Casey
On Sep 27, 12:48 pm, Simon Brunning [EMAIL PROTECTED] wrote: On 9/27/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy

Re: True of False

2007-09-27 Thread Duncan Booth
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [268]: 'c' in a == True Out[268]: False In [269]: ('c' in a) == True Out[269]: True In [270]: 'c' in (a == True) --- type 'exceptions.TypeError

Re: True of False

2007-09-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run this, it runs, but nothing

Re: True of False

2007-09-27 Thread Richard Thomas
On 27/09/2007, Casey [EMAIL PROTECTED] wrote: On Sep 27, 12:48 pm, Simon Brunning [EMAIL PROTECTED] wrote: On 9/27/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing

Re: True of False

2007-09-27 Thread Casey
On Sep 27, 1:12 pm, Richard Thomas [EMAIL PROTECTED] wrote: On 27/09/2007, Casey [EMAIL PROTECTED] wrote: On Sep 27, 12:48 pm, Simon Brunning [EMAIL PROTECTED] wrote: On 9/27/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get

Re: True of False

2007-09-27 Thread Carsten Haese
On Thu, 2007-09-27 at 16:47 +, Marc 'BlackJack' Rintsch wrote: On Thu, 27 Sep 2007 09:33:34 -0700, koutoo wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy

Re: True of False

2007-09-27 Thread Erik Jones
On Sep 27, 2007, at 11:47 AM, Marc 'BlackJack' Rintsch wrote: On Thu, 27 Sep 2007 09:33:34 -0700, koutoo wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c

Re: True of False

2007-09-27 Thread Gary Herron
Richard Thomas wrote: On 27/09/2007, Casey [EMAIL PROTECTED] wrote: On Sep 27, 12:48 pm, Simon Brunning [EMAIL PROTECTED] wrote: On 9/27/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried writing a true and false If statement and didn't get anything? I read some

Re: True of False

2007-09-27 Thread Erik Jones
On Sep 27, 2007, at 12:29 PM, Erik Jones wrote: On Sep 27, 2007, at 11:47 AM, Marc 'BlackJack' Rintsch wrote: On Thu, 27 Sep 2007 09:33:34 -0700, koutoo wrote: I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing

Re: True of False

2007-09-27 Thread Marc 'BlackJack' Rintsch
On Thu, 27 Sep 2007 17:06:30 +, Duncan Booth wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [268]: 'c' in a == True Out[268]: False In [269]: ('c' in a) == True Out[269]: True In [270]: 'c' in (a == True

Re: True of False

2007-09-27 Thread Marc Christiansen
Casey [EMAIL PROTECTED] wrote: I would recommend the OP try this: run the (I)python shell and try the following: a = [x for x in abcdefg] a ['a','b','c','d','e','f','g'] c in a True c in a == True False (c in a) == True True The reason your conditional failed

Re: True of False

2007-09-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : I tried writing a true and false If statement and didn't get anything? I read some previous posts, but I must be missing something. I just tried something easy: a = [a, b, c, d, e, f] if c in a == True: Print Yes When I run this, it runs, but nothing

Re: name capitalization of built-in types, True, and False

2007-05-12 Thread Gabriel Genellina
En Fri, 11 May 2007 17:37:48 -0300, [EMAIL PROTECTED] escribió: I see that naming conventions are such that classes usually get named CamelCase. So why are the built-in types named all lowercase (like list, dict, set, bool, etc.)? Because most of them originally were types and factory

  1   2   >