From 62d4b1483b850da0a99c2aa6c2da8b013e308f50 Mon Sep 17 00:00:00 2001 From: Damian Rzeszot Date: Mon, 9 Oct 2017 11:56:50 +0200 Subject: swift | fix style guidelines --- ru-ru/swift-ru.html.markdown | 8 ++++---- swift.html.markdown | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ru-ru/swift-ru.html.markdown b/ru-ru/swift-ru.html.markdown index 7ff660e1..46a91660 100644 --- a/ru-ru/swift-ru.html.markdown +++ b/ru-ru/swift-ru.html.markdown @@ -376,14 +376,14 @@ print("Имя :\(name)") // Имя: Яков // Протокол `Error` используется для перехвата выбрасываемых ошибок enum MyError: Error { - case BadValue(msg: String) - case ReallyBadValue(msg: String) + case badValue(msg: String) + case reallyBadValue(msg: String) } // фунции помеченные словом `throws` должны вызываться с помощью `try` func fakeFetch(value: Int) throws -> String { guard 7 == value else { - throw MyError.ReallyBadValue(msg: "Действительно плохое значение") + throw MyError.reallyBadValue(msg: "Действительно плохое значение") } return "тест" @@ -401,7 +401,7 @@ func testTryStuff() { do { // обычно try оператор, позволяющий обработать ошибку в `catch` блоке try fakeFetch(value: 1) - } catch MyError.BadValue(let msg) { + } catch MyError.badValue(let msg) { print("Ошибка: \(msg)") } catch { // все остальное diff --git a/swift.html.markdown b/swift.html.markdown index 60915d72..46388ca5 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -361,14 +361,14 @@ print("Name is \(name)") // Name is Them // The `Error` protocol is used when throwing errors to catch enum MyError: Error { - case BadValue(msg: String) - case ReallyBadValue(msg: String) + case badValue(msg: String) + case reallyBadValue(msg: String) } // functions marked with `throws` must be called using `try` func fakeFetch(value: Int) throws -> String { guard 7 == value else { - throw MyError.ReallyBadValue(msg: "Some really bad value") + throw MyError.reallyBadValue(msg: "Some really bad value") } return "test" @@ -385,7 +385,7 @@ func testTryStuff() { do { // normal try operation that provides error handling via `catch` block try fakeFetch(value: 1) - } catch MyError.BadValue(let msg) { + } catch MyError.badValue(let msg) { print("Error message: \(msg)") } catch { // must be exhaustive -- cgit v1.2.3 From d01e5242e16c522becc1b04f9692d2556f94c4f1 Mon Sep 17 00:00:00 2001 From: Damian Rzeszot Date: Mon, 9 Oct 2017 12:01:15 +0200 Subject: swift | fix style guidelines --- de-de/swift-de.html.markdown | 12 ++++++------ es-es/swift-es.html.markdown | 12 ++++++------ pt-br/swift-pt.html.markdown | 10 +++++----- pt-pt/swift-pt.html.markdown | 14 +++++++------- ru-ru/swift-ru.html.markdown | 12 ++++++------ swift.html.markdown | 12 ++++++------ tr-tr/swift-tr.html.markdown | 12 ++++++------ zh-cn/swift-cn.html.markdown | 12 ++++++------ 8 files changed, 48 insertions(+), 48 deletions(-) diff --git a/de-de/swift-de.html.markdown b/de-de/swift-de.html.markdown index b58a72d3..43b8c32a 100644 --- a/de-de/swift-de.html.markdown +++ b/de-de/swift-de.html.markdown @@ -440,13 +440,13 @@ if let circle = myEmptyCircle { // Wie Klassen auch können sie Methoden haben enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } @@ -455,7 +455,7 @@ enum Suit { // Enum-Werte können vereinfacht geschrieben werden, es muss nicht der Enum-Typ // genannt werden, wenn die Variable explizit deklariert wurde -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Nicht-Integer-Enums brauchen direkt zugewiesene "Rohwerte" enum BookName: String { diff --git a/es-es/swift-es.html.markdown b/es-es/swift-es.html.markdown index 8f63517a..ea892628 100644 --- a/es-es/swift-es.html.markdown +++ b/es-es/swift-es.html.markdown @@ -446,20 +446,20 @@ if let circle = myEmptyCircle { // Al igual que las clases, pueden contener métodos enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Los valores de enum permite la sintaxis corta, sin necesidad de poner // el tipo del enum cuando la variable es declarada de manera explícita -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Enums de tipo no-entero requiere asignaciones de valores crudas directas enum BookName: String { diff --git a/pt-br/swift-pt.html.markdown b/pt-br/swift-pt.html.markdown index ebf74b6f..bf410352 100644 --- a/pt-br/swift-pt.html.markdown +++ b/pt-br/swift-pt.html.markdown @@ -389,13 +389,13 @@ if mySquare === mySquare { // Podem conter métodos do mesmo jeito que classes. enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } diff --git a/pt-pt/swift-pt.html.markdown b/pt-pt/swift-pt.html.markdown index 9462ee1c..f7fab423 100644 --- a/pt-pt/swift-pt.html.markdown +++ b/pt-pt/swift-pt.html.markdown @@ -445,21 +445,21 @@ if let circle = myEmptyCircle { // Enums pode opcionalmente ser um tipo especifico ou não. // Enums podem conter métodos tal como as classes. -enum Suit { - case Spades, Hearts, Diamonds, Clubs +enum suit { + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Os valores de Enum permitem syntax reduzida, não é preciso escrever o tipo do enum // quando a variável é explicitamente definida. -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Enums que não sejam inteiros obrigam a atribuições valor bruto (raw value) diretas enum BookName: String { diff --git a/ru-ru/swift-ru.html.markdown b/ru-ru/swift-ru.html.markdown index 46a91660..24095ee5 100644 --- a/ru-ru/swift-ru.html.markdown +++ b/ru-ru/swift-ru.html.markdown @@ -535,20 +535,20 @@ if let circle = myEmptyCircle { // Они могут содержать методы подобно классам. enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Значения перечислений допускают сокращенный синтаксис, нет необходимости // указывать тип перечисления, когда переменная объявляется явно -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // Значения нецелочисленных перечислений должны быть указаны явно // или могут выводится с помощью функции `rawValue` из имени diff --git a/swift.html.markdown b/swift.html.markdown index 46388ca5..577fa559 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -518,20 +518,20 @@ if let circle = myEmptyCircle { // They can contain methods like classes. enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // Enum values allow short hand syntax, no need to type the enum type // when the variable is explicitly declared -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // String enums can have direct raw value assignments // or their raw values will be derived from the Enum field diff --git a/tr-tr/swift-tr.html.markdown b/tr-tr/swift-tr.html.markdown index e694d95d..c9473cb2 100644 --- a/tr-tr/swift-tr.html.markdown +++ b/tr-tr/swift-tr.html.markdown @@ -443,19 +443,19 @@ if let daire = benimBosDairem { // Sınıflar gibi metotlar içerebilirler. enum Kart { - case Kupa, Maca, Sinek, Karo + case kupa, maca, sinek, karo func getIcon() -> String { switch self { - case .Maca: return "♤" - case .Kupa: return "♡" - case .Karo: return "♢" - case .Sinek: return "♧" + case .maca: return "♤" + case .kupa: return "♡" + case .karo: return "♢" + case .sinek: return "♧" } } } // Enum değerleri kısayol syntaxa izin verir. Eğer değişken tipi açık olarak belirtildiyse enum tipini yazmaya gerek kalmaz. -var kartTipi: Kart = .Kupa +var kartTipi: Kart = .kupa // Integer olmayan enumlar direk değer (rawValue) atama gerektirir. enum KitapAdi: String { diff --git a/zh-cn/swift-cn.html.markdown b/zh-cn/swift-cn.html.markdown index cba9252d..7ebf8121 100644 --- a/zh-cn/swift-cn.html.markdown +++ b/zh-cn/swift-cn.html.markdown @@ -445,19 +445,19 @@ if let circle = myEmptyCircle { // 枚举可以像类一样,拥有方法 enum Suit { - case Spades, Hearts, Diamonds, Clubs + case spades, hearts, diamonds, clubs func getIcon() -> String { switch self { - case .Spades: return "♤" - case .Hearts: return "♡" - case .Diamonds: return "♢" - case .Clubs: return "♧" + case .spades: return "♤" + case .hearts: return "♡" + case .diamonds: return "♢" + case .clubs: return "♧" } } } // 当变量类型明确指定为某个枚举类型时,赋值时可以省略枚举类型 -var suitValue: Suit = .Hearts +var suitValue: Suit = .hearts // 非整型的枚举类型需要在定义时赋值 enum BookName: String { -- cgit v1.2.3 From 9a9e52b54bf9bc6ebeefc996452f5944a234557f Mon Sep 17 00:00:00 2001 From: Damian Rzeszot Date: Mon, 9 Oct 2017 12:02:29 +0200 Subject: swift | fix style guidelines --- de-de/swift-de.html.markdown | 6 +++--- es-es/swift-es.html.markdown | 6 +++--- pt-pt/swift-pt.html.markdown | 6 +++--- ru-ru/swift-ru.html.markdown | 6 +++--- swift.html.markdown | 6 +++--- tr-tr/swift-tr.html.markdown | 6 +++--- zh-cn/swift-cn.html.markdown | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/de-de/swift-de.html.markdown b/de-de/swift-de.html.markdown index 43b8c32a..c21b7e36 100644 --- a/de-de/swift-de.html.markdown +++ b/de-de/swift-de.html.markdown @@ -459,10 +459,10 @@ var suitValue: Suit = .hearts // Nicht-Integer-Enums brauchen direkt zugewiesene "Rohwerte" enum BookName: String { - case John = "John" - case Luke = "Luke" + case john = "John" + case luke = "Luke" } -print("Name: \(BookName.John.rawValue)") +print("Name: \(BookName.john.rawValue)") // Enum mit assoziierten Werten enum Furniture { diff --git a/es-es/swift-es.html.markdown b/es-es/swift-es.html.markdown index ea892628..cd16d318 100644 --- a/es-es/swift-es.html.markdown +++ b/es-es/swift-es.html.markdown @@ -463,10 +463,10 @@ var suitValue: Suit = .hearts // Enums de tipo no-entero requiere asignaciones de valores crudas directas enum BookName: String { - case John = "John" - case Luke = "Luke" + case john = "John" + case luke = "Luke" } -print("Name: \(BookName.John.rawValue)") +print("Name: \(BookName.john.rawValue)") // Enum con valores asociados enum Furniture { diff --git a/pt-pt/swift-pt.html.markdown b/pt-pt/swift-pt.html.markdown index f7fab423..5de2e13b 100644 --- a/pt-pt/swift-pt.html.markdown +++ b/pt-pt/swift-pt.html.markdown @@ -463,10 +463,10 @@ var suitValue: Suit = .hearts // Enums que não sejam inteiros obrigam a atribuições valor bruto (raw value) diretas enum BookName: String { - case John = "John" - case Luke = "Luke" + case john = "John" + case luke = "Luke" } -print("Name: \(BookName.John.rawValue)") +print("Name: \(BookName.john.rawValue)") // Enum com valores associados enum Furniture { diff --git a/ru-ru/swift-ru.html.markdown b/ru-ru/swift-ru.html.markdown index 24095ee5..5aa3d8e8 100644 --- a/ru-ru/swift-ru.html.markdown +++ b/ru-ru/swift-ru.html.markdown @@ -553,10 +553,10 @@ var suitValue: Suit = .hearts // Значения нецелочисленных перечислений должны быть указаны явно // или могут выводится с помощью функции `rawValue` из имени enum BookName: String { - case John - case Luke = "Лука" + case john + case luke = "Лука" } -print("Имя: \(BookName.John.rawValue)") +print("Имя: \(BookName.john.rawValue)") // Перечисление (enum) со связанными значениями enum Furniture { diff --git a/swift.html.markdown b/swift.html.markdown index 577fa559..a3b33e25 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -536,10 +536,10 @@ var suitValue: Suit = .hearts // String enums can have direct raw value assignments // or their raw values will be derived from the Enum field enum BookName: String { - case John - case Luke = "Luke" + case john + case luke = "Luke" } -print("Name: \(BookName.John.rawValue)") +print("Name: \(BookName.john.rawValue)") // Enum with associated Values enum Furniture { diff --git a/tr-tr/swift-tr.html.markdown b/tr-tr/swift-tr.html.markdown index c9473cb2..5e09daa9 100644 --- a/tr-tr/swift-tr.html.markdown +++ b/tr-tr/swift-tr.html.markdown @@ -459,10 +459,10 @@ var kartTipi: Kart = .kupa // Integer olmayan enumlar direk değer (rawValue) atama gerektirir. enum KitapAdi: String { - case John = "John" - case Luke = "Luke" + case john = "John" + case luke = "Luke" } -print("Name: \(KitapAdi.John.rawValue)") +print("Name: \(KitapAdi.john.rawValue)") // Değerlerle ilişkilendirilmiş Enum enum Mobilya { diff --git a/zh-cn/swift-cn.html.markdown b/zh-cn/swift-cn.html.markdown index 7ebf8121..002b117f 100644 --- a/zh-cn/swift-cn.html.markdown +++ b/zh-cn/swift-cn.html.markdown @@ -461,10 +461,10 @@ var suitValue: Suit = .hearts // 非整型的枚举类型需要在定义时赋值 enum BookName: String { - case John = "John" - case Luke = "Luke" + case john = "John" + case luke = "Luke" } -print("Name: \(BookName.John.rawValue)") +print("Name: \(BookName.john.rawValue)") // 与特定数据类型关联的枚举 enum Furniture { -- cgit v1.2.3 From e8ee66c854b8833fcb0fd76b5e9ace6ae8379397 Mon Sep 17 00:00:00 2001 From: Damian Rzeszot Date: Mon, 9 Oct 2017 12:03:27 +0200 Subject: swift | fix style guidelines --- de-de/swift-de.html.markdown | 14 +++++++------- es-es/swift-es.html.markdown | 12 ++++++------ pt-pt/swift-pt.html.markdown | 12 ++++++------ ru-ru/swift-ru.html.markdown | 12 ++++++------ swift.html.markdown | 12 ++++++------ tr-tr/swift-tr.html.markdown | 14 +++++++------- zh-cn/swift-cn.html.markdown | 12 ++++++------ 7 files changed, 44 insertions(+), 44 deletions(-) diff --git a/de-de/swift-de.html.markdown b/de-de/swift-de.html.markdown index c21b7e36..08f72a35 100644 --- a/de-de/swift-de.html.markdown +++ b/de-de/swift-de.html.markdown @@ -467,23 +467,23 @@ print("Name: \(BookName.john.rawValue)") // Enum mit assoziierten Werten enum Furniture { // mit Int assoziiert - case Desk(height: Int) + case desk(height: Int) // mit String und Int assoziiert - case Chair(String, Int) - + case chair(String, Int) + func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/es-es/swift-es.html.markdown b/es-es/swift-es.html.markdown index cd16d318..22e3c532 100644 --- a/es-es/swift-es.html.markdown +++ b/es-es/swift-es.html.markdown @@ -471,23 +471,23 @@ print("Name: \(BookName.john.rawValue)") // Enum con valores asociados enum Furniture { // Asociación con Int - case Desk(height: Int) + case desk(height: Int) // Asociación con String e Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/pt-pt/swift-pt.html.markdown b/pt-pt/swift-pt.html.markdown index 5de2e13b..6b263942 100644 --- a/pt-pt/swift-pt.html.markdown +++ b/pt-pt/swift-pt.html.markdown @@ -471,23 +471,23 @@ print("Name: \(BookName.john.rawValue)") // Enum com valores associados enum Furniture { // Associar com um inteiro (Int) - case Desk(height: Int) + case desk(height: Int) // Associar com uma String e um Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/ru-ru/swift-ru.html.markdown b/ru-ru/swift-ru.html.markdown index 5aa3d8e8..f2b1fd36 100644 --- a/ru-ru/swift-ru.html.markdown +++ b/ru-ru/swift-ru.html.markdown @@ -561,23 +561,23 @@ print("Имя: \(BookName.john.rawValue)") // Перечисление (enum) со связанными значениями enum Furniture { // Связать с типом Int - case Desk(height: Int) + case desk(height: Int) // Связать с типами String и Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Письменный стол высотой \(height) см." - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Стул марки \(brand) высотой \(height) см." } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Письменный стол высотой 80 см." -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Стул марки Foo высотой 40 см." diff --git a/swift.html.markdown b/swift.html.markdown index a3b33e25..516debed 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -544,23 +544,23 @@ print("Name: \(BookName.john.rawValue)") // Enum with associated Values enum Furniture { // Associate with Int - case Desk(height: Int) + case desk(height: Int) // Associate with String and Int - case Chair(String, Int) + case chair(String, Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair("Foo", 40) +var chair = Furniture.chair("Foo", 40) print(chair.description()) // "Chair of Foo with 40 cm" diff --git a/tr-tr/swift-tr.html.markdown b/tr-tr/swift-tr.html.markdown index 5e09daa9..4c2cf59b 100644 --- a/tr-tr/swift-tr.html.markdown +++ b/tr-tr/swift-tr.html.markdown @@ -467,23 +467,23 @@ print("Name: \(KitapAdi.john.rawValue)") // Değerlerle ilişkilendirilmiş Enum enum Mobilya { // Int ile ilişkilendirilmiş - case Masa(yukseklik: Int) + case masa(yukseklik: Int) // String ve Int ile ilişkilendirilmiş - case Sandalye(String, Int) - + case sandalye(String, Int) + func aciklama() -> String { switch self { - case .Masa(let yukseklik): + case .masa(let yukseklik): return "Masa boyu \(yukseklik) cm" - case .Sandalye(let marka, let yukseklik): + case .sandalye(let marka, let yukseklik): return "\(brand) marka sandalyenin boyu \(yukseklik) cm" } } } -var masa: Mobilya = .Masa(yukseklik: 80) +var masa: Mobilya = .masa(yukseklik: 80) print(masa.aciklama()) // "Masa boyu 80 cm" -var sandalye = Mobilya.Sandalye("Foo", 40) +var sandalye = Mobilya.sandalye("Foo", 40) print(sandalye.aciklama()) // "Foo marka sandalyenin boyu 40 cm" diff --git a/zh-cn/swift-cn.html.markdown b/zh-cn/swift-cn.html.markdown index 002b117f..c25b2918 100644 --- a/zh-cn/swift-cn.html.markdown +++ b/zh-cn/swift-cn.html.markdown @@ -469,23 +469,23 @@ print("Name: \(BookName.john.rawValue)") // 与特定数据类型关联的枚举 enum Furniture { // 和 Int 型数据关联的枚举记录 - case Desk(height: Int) + case desk(height: Int) // 和 String, Int 关联的枚举记录 - case Chair(brand: String, height: Int) + case chair(brand: String, height: Int) func description() -> String { switch self { - case .Desk(let height): + case .desk(let height): return "Desk with \(height) cm" - case .Chair(let brand, let height): + case .chair(let brand, let height): return "Chair of \(brand) with \(height) cm" } } } -var desk: Furniture = .Desk(height: 80) +var desk: Furniture = .desk(height: 80) print(desk.description()) // "Desk with 80 cm" -var chair = Furniture.Chair(brand: "Foo", height: 40) +var chair = Furniture.chair(brand: "Foo", height: 40) print(chair.description()) // "Chair of Foo with 40 cm" -- cgit v1.2.3