Skip to content
Open
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
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ ic| d['key'][1]: 'one'
ic| klass.attr: 'yep'
```

For short, single-line output, literal arguments are displayed as values only.
For example, `ic(123)` prints `ic| 123`, while `ic(foo)` includes both `foo` and
its value.

Just give `ic()` a variable or expression and you're done. Easy.


Expand Down Expand Up @@ -178,8 +182,8 @@ ic(3)
Prints

```
ic| 1: 1
ic| 3: 3
ic| 1
ic| 3
```

`ic()` continues to return its arguments when disabled, of course; no existing
Expand Down Expand Up @@ -256,7 +260,7 @@ or a function.
>>>
>>> ic.configureOutput(prefix=unixTimestamp)
>>> ic('world')
1519185860 |> 'world': 'world'
1519185860 |> 'world'
```

`prefix`'s default value is `ic| `.
Expand All @@ -274,7 +278,7 @@ stderr (the default).
>>>
>>> ic.configureOutput(outputFunction=warn)
>>> ic('eep')
WARNING:root:ic| 'eep': 'eep'
WARNING:root:ic| 'eep'
```

`argToStringFunction`, if provided, is called with argument values to be
Expand All @@ -293,7 +297,7 @@ in a custom fashion.
>>>
>>> ic.configureOutput(argToStringFunction=toString)
>>> ic(7, 'hello')
ic| 7: 7, 'hello': [!string 'hello' with length 5!]
ic| 7, [!string 'hello' with length 5!]
```

The default `argToStringFunction` is `icecream.argumentToString`, and
Expand Down