Skip to content

Commit

Permalink
basics docs updated: embedding explained
Browse files Browse the repository at this point in the history
  • Loading branch information
arekbulski committed Jan 20, 2020
1 parent 95be94c commit 53c4c88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Thanks to blapid, containers can also be searched. Structs nested within Structs
[1, 2]


Nesting
Nesting and embedding
---------------------

Structs can be nested. Structs can contain other Structs, as well as any other constructs. Here's how it's done:
Expand All @@ -145,6 +145,8 @@ Container:
inner = Container:
data = b'1234'

It used to be that structs could have been embedded (flattened out). However, this created more problems than it solved so this feature was recently removed. Since Construct 2.10 its no longer possible to embed structs. You should, and always should have been, be nesting them just like in the example above.


Hidden context entries
----------------------
Expand Down

0 comments on commit 53c4c88

Please sign in to comment.