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

C

Chris “Kwpolska†Warrick

void...........?

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

Chris Angelico

void...........?

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
 
S

Steven D'Aprano

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.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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,100
Messages
2,570,635
Members
47,242
Latest member
BarrettMan

Latest Threads

Top