Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8710183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:33:42+00:00 2026-06-13T04:33:42+00:00

I read this documentation: http://docs.python.org/reference/simple_stmts.html Now, I want to create statements like it describes.

  • 0

I read this documentation:
http://docs.python.org/reference/simple_stmts.html

Now, I want to create statements like it describes. For example, a statement that concat a multiple assert and print statements. The syntax is unclear. How would I use the ::= operator?

I will be grateful for a clear example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:33:43+00:00Added an answer on June 13, 2026 at 4:33 am

    I think you are confusing the Python grammar reference with examples of actual Python code. The sections with ::= are formally describing the structure of Python statements in Backus–Naur Form. The other examples show actual Python code, and how the formal grammar looks in practice.

    For example, the grammar element assert_stmt has the form:

    assert_stmt ::= "assert" expression ["," expression]
    

    This describes the structure of an actual Python assert statement, for example:

    assert (2 + 2 == 4), "The world is ending!"
    

    The quoted elements in the grammar, called terminals, appear literally in the Python syntax. These include, for example, the assert keyword and the comma. The unquoted parts refer to other grammar elements, called nonterminals; for example, expression corresponds to a Python expression returning a value. Grammar elements in brackets [] denote optionality, so expression ["," expression] refers to a comma-separated list of one or two expressions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a simple example from the python documentation (http://docs.python.org/extending/extending.html): static PyObject * spam_system(PyObject
I've read through all of the Spring 3 Web docs: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/spring-web.html but have been
http://docs.djangoproject.com/en/dev/ref/models/fields/#choices i've read through the documentation and this implies using a database table for
The samples and documentation in question can be found here: http://static.springsource.org/spring-flex/docs/1.5.0.M1/ The reference doc
According to this documentation ( http://java.sun.com/docs/books/jls/third_edition/html/lexical.html , 3.10.6) an OctalEscape will be converted to
I read this article : http://lwuit.blogspot.in/2008/06/lightweight-text-input-in-lwuit.html This article talks of autocomplete textfield embedded on
I've read the Django documentation here: http://docs.djangoproject.com/en/dev/ref/forms/validation/ I've also browsed a number of search
The documentation says: http://docs.djangoproject.com/en/dev/ref/settings/#time-zone Note that this is the time zone to which Django
I just read the Trail on RMI from sun at http://java.sun.com/docs/books/tutorial/rmi/implementing.html When I run
I read this page: http://www.djangoproject.com/documentation/models/custom_pk/ , and the example doesn't list unique=True. I'm wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.