Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup for loop example + bump stated Python version #290

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Local Previewing (How To Build)

First make sure you have the required dependencies used for building docs:

* Python interpreter >= 3.7
* Python interpreter >= 3.9
* Sphinx: https://www.sphinx-doc.org/en/master/
* Read the Docs Sphinx Theme: https://github.com/rtfd/sphinx_rtd_theme
* GitPython: https://github.com/gitpython-developers/GitPython
Expand Down
2 changes: 1 addition & 1 deletion install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ development headers for libraries:
* Libpcap (http://www.tcpdump.org)
* Make
* OpenSSL (http://www.openssl.org)
* Python 3.7 or greater (https://www.python.org/)
* Python 3.9 or greater (https://www.python.org/)
* SWIG (http://www.swig.org)
* Zlib (https://zlib.net/)

Expand Down
18 changes: 9 additions & 9 deletions script-reference/statements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -718,29 +718,29 @@ Example:
.. code-block:: zeek

local myset = set(80/tcp, 81/tcp);
local mytable = table([10.0.0.1, 80/tcp]="s1", [10.0.0.2, 81/tcp]="s2");
local myvector = vector("zero", "one, "two");
local mytable = table([ 10.0.0.1, 80/tcp ] = "s1", [ 10.0.0.2, 81/tcp ] = "s2");
local myvector = vector("zero", "one", "two");

for ( p in myset )
print p;

for ( [i,j], val in mytable )
for ( [ip, p], val in mytable )
{
if (val == "done")
if ( val == "done" )
break;
if (val == "skip")
if ( val == "skip" )
next;
print i,j;
print ip, p;
}

for ( _, val in mytable )
print val;

for ( [i,_], _ in mytable )
print i;
for ( [ip, _], _ in mytable )
print ip;

for ( i, val in myvector )
print i,val;
print i, val;

for ( _, val in myvector )
print val;
Expand Down
Loading