Template:Comment: Difference between revisions

From FreeAllegiance Wiki
Jump to navigationJump to search
(Whoops.)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<span style="color:#888">''{{{1}}}''</span><noinclude>
<span style="color:#888">''{{{1}}}''</span><noinclude>


[[Category:Template]]
==Usage==
Code code code <nowiki>{{Comment|Your comment here}}</nowiki>


== Usage sample ==
 
== Example ==
 
def list(*stuff): <nowiki>{{comment|#accept a list as argument}}</nowiki>
  return ", ".join(stuff)
 
Gives:


  def list(*stuff): {{comment|#accept a list as argument}}
  def list(*stuff): {{comment|#accept a list as argument}}
   return ", ".join(stuff)
   return ", ".join(stuff)
 
{{comment|#All of the following are valid calls.}}
[[Category:Templates]]
print list("foo")
print list("foo", "bar")
print list("foo", "bar", "bananana")

Latest revision as of 21:23, 13 February 2009

{{{1}}}

Usage

Code code code {{Comment|Your comment here}}


Example

def list(*stuff): {{comment|#accept a list as argument}}
  return ", ".join(stuff)

Gives:

def list(*stuff): #accept a list as argument
  return ", ".join(stuff)