代码的艺术(2)

package com.qianmo.beziershopcart;
 
/**
 * Created by wangjitao on 2017/4/10 0010.
 * E-Mail:[email protected]
 */
 
public class ShopBean {
 
    private String title;
    private String price;
    private int count;
 
    public ShopBean(String title, String price, int count) {
        this.title = title;
        this.price = price;
        this.count = count;
    }
 
    public String getTitle() {
        return title;
    }
 
    public void setTitle(String title) {
        this.title = title;
    }
 
    public String getPrice() {
        return price;
    }

much better,这里将展示如何在某句话内引用代码比如 ,这样就可以直接引用了~

@requires_authorization
def somefunc(param1='', param2=0):
    '''A docstring'''
    if param1 > param2: # interesting
        print 'Greater'
    return (param2 - param1 + 1) or None
class SomeClass:
    pass
>>> message = '''interpreter
... prompt'''

你可能感兴趣的:(代码的艺术(2))