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


Groups > comp.lang.python > #104646

hasattr() or "x in y"?

From "Charles T. Smith" <cts.private.yahoo@gmail.com>
Newsgroups comp.lang.python
Subject hasattr() or "x in y"?
Date 2016-03-11 21:44 +0000
Organization A noiseless patient Spider
Message-ID <nbve7c$nbo$1@dont-email.me> (permalink)

Show all headers | View raw


From the performance point of view, which is better:
- hasattr()
- x in y

TIA
cts

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


Thread

hasattr() or "x in y"? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-03-11 21:44 +0000
  Re: hasattr() or "x in y"? Chris Angelico <rosuav@gmail.com> - 2016-03-12 08:55 +1100
  Re: hasattr() or "x in y"? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-03-11 21:53 +0000
    Re: hasattr() or "x in y"? Chris Angelico <rosuav@gmail.com> - 2016-03-12 09:04 +1100
    Re: hasattr() or "x in y"? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-11 22:05 +0000
  Re: hasattr() or "x in y"? Grant Edwards <invalid@invalid.invalid> - 2016-03-11 22:00 +0000
    Re: hasattr() or "x in y"? "Charles T. Smith" <cts.private.yahoo@gmail.com> - 2016-03-11 22:18 +0000
      Re: hasattr() or "x in y"? Grant Edwards <invalid@invalid.invalid> - 2016-03-11 22:30 +0000

csiph-web