question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bracket lists shouldn't be == to parenthesized lists

See original GitHub issue

Currently bracketed lists in 3.5 are ==-equivalent to parenthesized lists with the same contents. This doesn’t match the behavior of lists with different separators, or the general principle that ==-equivalence should roughly track CSS equivalence.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nex3commented, May 18, 2017

To add some more detail: in Sass’s internals, lists never have parentheses. When you write (1 2 3), the parentheses mean the same thing that they do in (1 + 1)—they just group the expression. So the only question is whether a list has brackets or has no brackets, which is answered by is-bracketed().

1reaction
xzyfercommented, May 15, 2017

Sorry for the short reply I’m on my phone. I think you’ll find most of the answers in sass-graph

https://github.com/sass/sass-spec/tree/master/spec/sass_3_5/functions

Check out the join and is-bracketed folders.

On 14 May 2017 8:53 pm, “Miriam Suzanne” notifications@github.com wrote:

@nex3 https://github.com/nex3 is there a list-separator() equivalent for checking if a list uses brackets vs parenthesis? Also, is an un-specified list like one two three forced into one of the two categories by default?

In True test output, we have to help users understand that lists can output the same inspect value, and still be unequal.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sass/sass/issues/2121#issuecomment-301332116, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjZWITq-FZrl7brsBX7pmT72M6eoHTpks5r502_gaJpZM4JkH0P .

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the difference between lists enclosed by square ...
Square brackets are lists while parentheses are tuples. A list is mutable, meaning you can change its contents: >>> x = [1,2] >>>...
Read more >
2.4 Pairs, Lists, and Racket Syntax
A value that prints like a quoted identifier is a symbol. In the same way that parenthesized output should not be confused with...
Read more >
2.4 Pairs, Lists, and Scheme Syntax
A value that prints like an identifier is a symbol. In the same way that parenthesized output should not be confused with expressions,...
Read more >
Why do lists use brackets instead of parenthesis?
Lists are defined by the brackets. Function parameters and tuples are defined by the parens. Dictionaries and sets are defined by the braces....
Read more >
Python parentheses primer
Shouldn't t be a tuple?” No, t is an integer. ... The square brackets tell Python that this is a list comprehension, producing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found