Skip to content

Update about_Properties to introduce the term member enumeration and to document the behavior with array-valued properties #2198

Closed

Description

PowerShell/PowerShell#6454 discusses the perhaps surprising behavior of member enumeration with array-valued properties.

The current about_Properties help topic:

  • discusses member enumeration - a term coined in this 2012 PowerShell team blog post - only in the abstract and never gives it a name.

  • unlike the blog post, does not discuss the implications of using member enumeration with array-valued properties; in short:

    • ( @{ a=1,2 }, @{ a=3,4 }).a is the equivalent of @{ a=1,2 }, @{ a=3,4 } | ForEach-Object { $_.a } (resulting in 1, 2, 3, 4, a flat array of 4 elements) and not, as is another possible interpretation of the current documentation, (1, 2), (3, 4) (an array with 2 elements whose elements are 2-element arrays).

Version(s) of document impacted

  • Impacts 6 document
  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document

Reason(s) for not selecting all version of documents

  • The documented feature was introduced in selected version of PowerShell
  • This issue only shows up in selected version of the document

Activity

  1. added a commit that references this issue on Aug 21, 2018
  2. added a commit that references this issue on Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Pri3Priority - Low

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions