Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Coding Issue!
#4
This Python example page explains the use of the pass statement to indicate empty functions, classes and loops.
Pass. Time passes. And often nothing happens. In Python we use the "pass" keyword (a statement) to indicate that nothing happens—the function, class or loop is empty.

With pass, we indicate a "null" block. Pass can be placed on the same line, or on a separate line. Pass can be used to quickly add things that are unimplemented.

Method example. Here we use the "pass" statement on two methods. These methods do nothing. But they can be called in Python code.

Result: Nothing happens when the pass methods are called. The pass can be used in other places in Python programs.
Reply


Messages In This Thread
Python Coding Issue! - by ankitdixit - Sep-13-2019, 08:33 AM
RE: Python Coding Issue! - by jsira2003 - Sep-13-2019, 09:56 AM
RE: Python Coding Issue! - by perfringo - Sep-13-2019, 10:58 AM
RE: Python Coding Issue! - by rohanjoshi0894 - Sep-25-2019, 06:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Very basic coding issue aary 4 2,487 Jun-03-2020, 11:59 AM
Last Post: buran
  Very basic coding issue mstichler 3 2,604 Jun-03-2020, 04:35 AM
Last Post: mstichler
  Coding issue 1557676 2 31,513 Aug-02-2019, 08:54 PM
Last Post: cvsae
  New member with simple coding issue shaikh 0 3,009 Apr-24-2017, 05:28 PM
Last Post: shaikh
  coding issue Lee 2 3,507 Feb-13-2017, 10:53 AM
Last Post: Lee

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020