Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Class

Symbols

  • InheritDefinitions
Wolfram`Class`
InheritDefinitions
​
InheritDefinitions[source,target]
make
target
symbol inherit all definitions from the
source
symbol.
​
Details and Options

Examples  
(11)
Basic Examples  
(6)
Inherit all current and consequent definitions of a symbol:
In[1]:=
ClearAll[a,b]​​a["x"]=123;​​
InheritDefinitions
[a,b]​​​​a["y"]=456;​​a[x_][y_]:=x+y​​​​{b["x"],b["y"],b[2][3]}
Out[1]=
{123,456,5}
​
Inherit
UpValues
:
In[1]:=
ClearAll[a,b,f]​​
InheritDefinitions
[a,b]​​​​f[a]^:=a["Value"]^2​​​​b["Value"]=13;​​​​f[b]
Out[1]=
169
In[2]:=
ClearAll[T,a,b,f]​​
InheritDefinitions
[T,a]​​
InheritDefinitions
[T,b]​​​​f[a:T,b:T]^:=a["Value"]+b["Value"]​​​​a["Value"]=13;​​b["Value"]=42;​​​​f[a,b]
Out[2]=
55
​
Inherit
OwnValues
:
In[1]:=
ClearAll[a,b,c]​​
InheritDefinitions
[a,b]​​​​a/;c=1;​​a/;!c=2;​​​​{Block[{c=True},b],Block[{c=False},b]}
Out[1]=
{1,2}
​
Inherit formatting:
In[1]:=
ClearAll[a,b]​​
InheritDefinitions
[a,b]​​​​Format[a]:=a["Format"];​​​​a["Format"]="A";​​b["Format"]="B";​​​​{a,b}
Out[1]=
{A,B}
Inherit
Options
and
Default
values:
In[2]:=
ClearAll[a,b]​​
InheritDefinitions
[a,b]​​​​Default[a]=123;​​Options[a]={"Option"234};​​​​Replace[b[],b[x_.,OptionsPattern[]]{x,OptionValue["Option"]}]
Out[2]=
{123,234}
​
Inherit
NValues
:
In[1]:=
ClearAll[a,b]​​
InheritDefinitions
[a,b]​​​​a["Value"]=123;​​N[a,args___]:=N[a["Value"],args]​​b["Value"]=234;​​​​N[b,12]
Out[1]=
234.000000000
​
Inherit
Messages
:
In[1]:=
ClearAll[a,b]​​
InheritDefinitions
[a,b]​​​​a::msg="Hello ``";​​​​Message[b::msg,"World"]
b
::msg
:Hello World
​
Scope  
(3)

Possible Issues  
(2)

SeeAlso
Definition
▪
DownValues
▪
UpValues
▪
SubValues
▪
DefaultValues
▪
N
▪
Messages
▪
Options
▪
Attributes
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com