A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-November/018750.html below:

[Python-Dev] What's a PyStructSequence ?

[Python-Dev] What's a PyStructSequence ? [Python-Dev] What's a PyStructSequence ?Martin v. Loewis martin@v.loewis.de
Tue, 27 Nov 2001 22:21:33 +0100
> What are they used at the C level for?

To return them to Python. You write

  Py_INCREF(Py_True);
  return Py_True;

or

  result = c ? Py_True : Py_False;
  Py_INCREF(result);
  return result;

just as you return None. That saves atleast one function call.

Py_True, of course, *is* 1. There is no proper boolean type.

Regards,
Martin



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4