Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A awesome-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 317
    • Merge requests 317
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Vinta Chen
  • awesome-python
  • Merge requests
  • !1032

Add IceCream to Debugging Tools/Other.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/gruns/master into master Mar 08, 2018
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: gruns

What is this Python project?

IceCream is a small Python library that makes it easy to debug variables, expressions, and code execution with a single, simple function: ic(). (short for IceCream)

With arguments, ic() inspects itself and prints both its own arguments and those argument's values.

from icecream import ic

def foo(i):
    return i + 333

ic(foo(123))

Prints

ic| foo(123): 456

Without arguments, ic() inspects itself and prints the calling filename and line number.

from icecream import ic

def foo():
    ic()
    return 'bar'

foo()

Prints

ic| example.py:4 in foo()

See more IceCream magic and examples in IceCream's docs, here.

IceCream is well tested, permissively licensed, and supports Python 2, Python 3, PyPy2, and PyPy3.

What's the difference between this Python project and similar ones?

IceCream's closest cousin is q (https://github.com/zestyping/q), but IceCream is simpler, customizable, and actively maintained.

--

Anyone who agrees with this pull request could vote for it by adding a 👍 to it, and usually, the maintainer will merge it when votes reach 20.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/gruns/master