Tutorial: Adding a new Mathics3 Function¶

In this tutorial, we will show how to create a new Mathics3 Function using Python.

After reading this you may want to go through the detailed examples in Case Studies for Adding Builtins

  • Hello, World! – using Predefined
  • Introducing the Builtin Class and Pattern-based Parameter Specification
  • Checking Parameter Counts
  • Adding Help (Information[]) Text
  • Writing Document Tests
  • Working with Multiple Patterns
  • Function Application via Rules
  • Class variables and Function Attributes
  • Emitting Warnings and Errors

Mathics3

Navigation

Contents:

  • The Components of Mathics3
  • Installing Mathics3
  • Running Mathics3
  • Reporting Bugs and Problems
  • Input/Output Unicode Tables
  • Mathics3 Kernel Interpreter
  • Extending Mathics3
    • Mathics3 Setup Code Read on Loading
    • Mathics3 Packages
    • Setup for Developing Mathics3 Python Code
    • Mathics3 from Python
      • Using Mathics3 from your code
      • Tutorial: Adding a new Mathics3 Function
        • Hello, World! – using Predefined
        • Introducing the Builtin Class and Pattern-based Parameter Specification
        • Checking Parameter Counts
        • Adding Help (Information[]) Text
        • Writing Document Tests
        • Working with Multiple Patterns
        • Function Application via Rules
        • Class variables and Function Attributes
        • Emitting Warnings and Errors
      • Case Studies for Adding Builtins
      • Guide Sections and Subsections
      • Documentation Markup
      • Guidelines for Writing Documentation
      • Thoughts and Experience from Adding Builtins
      • Contributing & Developing
      • Running Tests
  • Making a Mathics3 Release

Related Topics

  • Documentation overview
    • Extending Mathics3
      • <no title>
        • Mathics3 from Python
          • <no title>
            • Previous: <no title>
            • Next: Hello, World! – using Predefined
©2020-2026 The Mathics3 Team. | Powered by Sphinx 9.1.0 & Alabaster 1.0.0 | Page source