Ai
3 Star 0 Fork 0

mirrors_go-python/gpython

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cell.go 664 Bytes
一键复制 编辑 原始数据 按行查看 历史
// Cell object
//
// In the Go implementation this is just a pointer to an Object which
// can be nil
package py
// A python Cell object
type Cell struct {
obj *Object
}
var CellType = NewType("cell", "cell object")
// Type of this object
func (o *Cell) Type() *Type {
return CellType
}
// Define a new cell
func NewCell(obj Object) *Cell {
return &Cell{&obj}
}
// Fetch the contents of the Cell or nil if not set
func (c *Cell) Get() Object {
if c.obj == nil {
return nil
}
return *c.obj
}
// Set the contents of the Cell
func (c *Cell) Set(obj Object) {
c.obj = &obj
}
// Delete the contents of the Cell
func (c *Cell) Delete() {
c.obj = nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_go-python/gpython.git
git@gitee.com:mirrors_go-python/gpython.git
mirrors_go-python
gpython
gpython
v0.0.1

搜索帮助