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


Groups > comp.lang.python > #54538 > unrolled thread

In Python language, what is (void) referring to?

Started byDon Sylvia <donsylvia95@gmail.com>
First post2013-09-21 02:10 -0700
Last post2013-09-21 09:59 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  In Python language, what is (void) referring to? Don Sylvia <donsylvia95@gmail.com> - 2013-09-21 02:10 -0700
    Re: In Python language, what is (void) referring to? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-09-21 11:21 +0200
    Re: In Python language, what is (void) referring to? Chris Angelico <rosuav@gmail.com> - 2013-09-21 19:34 +1000
    Re: In Python language, what is (void) referring to? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-21 09:59 +0000

#54538 — In Python language, what is (void) referring to?

FromDon Sylvia <donsylvia95@gmail.com>
Date2013-09-21 02:10 -0700
SubjectIn Python language, what is (void) referring to?
Message-ID<2e7e060c-c029-4e20-a0f4-6c7b312a8282@googlegroups.com>
void...........?

[toc] | [next] | [standalone]


#54540

FromChris “Kwpolska” Warrick <kwpolska@gmail.com>
Date2013-09-21 11:21 +0200
Message-ID<mailman.219.1379755284.18130.python-list@python.org>
In reply to#54538
On Sat, Sep 21, 2013 at 11:10 AM, Don Sylvia <donsylvia95@gmail.com> wrote:
> void...........?
> --
> https://mail.python.org/mailman/listinfo/python-list

void does not exist in Python, unless you named a variable “void”.  In
that case, it means whatever you set it to.

-- 
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

[toc] | [prev] | [next] | [standalone]


#54541

FromChris Angelico <rosuav@gmail.com>
Date2013-09-21 19:34 +1000
Message-ID<mailman.220.1379756077.18130.python-list@python.org>
In reply to#54538
On Sat, Sep 21, 2013 at 7:10 PM, Don Sylvia <donsylvia95@gmail.com> wrote:
> void...........?
> --
> https://mail.python.org/mailman/listinfo/python-list

That looks like a C-style cast, though casting to void is unusual. If
you're looking at the source code to CPython, you might find something
like that. In C it usually means "I don't care about the return value
of this function".

ChrisA

[toc] | [prev] | [next] | [standalone]


#54543

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-09-21 09:59 +0000
Message-ID<523d6def$0$29988$c3e8da3$5496439d@news.astraweb.com>
In reply to#54538
On Sat, 21 Sep 2013 02:10:49 -0700, Don Sylvia wrote:

> void...........?

In Python, void doesn't mean anything.

[steve@ando ~]$ python
Python 2.7.2 (default, May 18 2012, 18:25:10)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> void
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'void' is not defined


What gave you the idea that void was part of Python?


-- 
Steven

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web