Skip to content

Conversation

@brunoro
Copy link

@brunoro brunoro commented Jul 11, 2013

As discussed on the elixir-talk list:

iex(1)> Kernel.inspect [a: 1,b: 2], raw: true
"[{:a, 1}, {:b, 2}]"
iex(2)> Kernel.inspect [a: 1,b: 2], raw: false
"[a: 1, b: 2]"
iex(3)> Kernel.inspect [a: 1,b: 2]            
"[a: 1, b: 2]"

@brunoro
Copy link
Author

brunoro commented Jul 11, 2013

created another pull request as I messed up with branch names on that one ⬆️

josevalim pushed a commit that referenced this pull request Jul 12, 2013
kwlist are inspected as a list of tuples with raw: true
@josevalim josevalim merged commit 095a91a into elixir-lang:master Jul 12, 2013
@mgwidmann
Copy link
Contributor

Any reason why this doesn't work anymore?

elixir -v
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.2.3iex
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (1.2.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Kernel.inspect [a: 1, b: 2], raw: true
"[a: 1, b: 2]"

Also noticing things like structs and stuff that override the inspect protocol like regular expressions don't print out any differently...

iex(2)> Kernel.inspect ~r/a|b/, raw: true
"~r/a|b/"

I agree with Dave Thomas, I'd like to see the magic stripped away. https://groups.google.com/forum/#!msg/elixir-lang-talk/bfLdUrvCs-U/30nCxofrHGsJ

Is this intentional?

@ericmj
Copy link
Member

ericmj commented Apr 1, 2016

Please use the mailing list for questions.

@josevalim
Copy link
Member

If you type h inspect in your terminal, it shows the options are listed on Inspect.Opts. Then, by typing h Inspect.Opts, you can see there is no raw: true anymore. The option was broken down into specific ones before 1.0 was release, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants