Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78750
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rorocodeath@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.064 |
| X-Spam-Evidence | '*H*': 0.88; '*S*': 0.01; 'subject:instance': 0.09; 'def': 0.12; 'subject:variable': 0.16; 'subject:python': 0.16; 'module': 0.19; 'message-id:@mail.gmail.com': 0.30; 'received:google.com': 0.35; 'var': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'ins': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Qz7MKZrB0J7UIG4WLs6+N92lF5XLQTnL4htCPayoca4=; b=EiMcGNrvl9vX/g5QttrPpxx1oiHdWXAbSbAJ1AWuLHtjkB7ZgMzeLKk3QYukeIe1LN v4MxyhN8xHlqyfbZTJUAO/yv99EKbkwfpRFYQGx7B5Sgj0WarUT+HcXFqn7FFCbFiH8t sofqROFuPBNXbMhdnyBBQpeAdrnzFs8KA9KquEHSKpFJ1pW3yAfMC+ZxFVmtD+8w6rla JfkVRHN3SnFexLzUYBbhOWOt7xXqf4HkIdWOa7jHAcPxIcNiPKQvUF87FAtgEoPNCX0F 6ne06jI8IscAFOWzwa9CXfYxpgVPo0m7eJF8rt9dVVbHyYdSkno1B44WcoqNv4eBALIN AFhw== |
| MIME-Version | 1.0 |
| X-Received | by 10.140.85.17 with SMTP id m17mr25925126qgd.50.1412589993219; Mon, 06 Oct 2014 03:06:33 -0700 (PDT) |
| Date | Mon, 6 Oct 2014 18:06:33 +0800 |
| Subject | ruby instance variable in python |
| From | roro codeath <rorocodeath@gmail.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=001a11c121c8c25f750504be3ce0 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14632.1412590002.18130.python-list@python.org> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1412590002 news.xs4all.nl 2869 [2001:888:2000:d::a6]:53215 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:78750 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
in ruby:
module M
def ins_var
@ins_var ||= nil
end
def m
@ins_var = 'val'
end
def m2
m
ins_var # => 'val'
end
end
in py:
# m.py
# how to def ins_var
def m:
# how to set ins_var
def m2:
m()
# how to get ins var
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
ruby instance variable in python roro codeath <rorocodeath@gmail.com> - 2014-10-06 18:06 +0800
Re: ruby instance variable in python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-07 05:54 +1100
Re: ruby instance variable in python flebber <flebber.crue@gmail.com> - 2014-10-07 05:29 -0700
Re: ruby instance variable in python Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-10-07 15:46 +0300
Re: ruby instance variable in python flebber <flebber.crue@gmail.com> - 2014-10-07 17:59 -0700
Re: ruby instance variable in python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-08 12:32 +1100
Re: ruby instance variable in python flebber <flebber.crue@gmail.com> - 2014-10-08 03:12 -0700
csiph-web